home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-01-14 | 1.3 MB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Jan 13 09:16:28 1992, modified Tue Jan 14 12:02:53 1992, creator 'HLX2', type 'ONLN', 1348856 bytes "Devices" , at 0x149578 19084 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 44 65 76 69 63 65 | 73 00 00 00 00 00 00 00 |..Device|s.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 14 94 f8 00 | 00 4a 8c a5 97 4f bc a5 |........|.J...O..|
|00000060| 98 c8 3d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..=.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4c 30 00 00 |........|....L0..|
|00000080| 49 6e 73 69 64 65 20 4d | 61 63 69 6e 74 6f 73 68 |Inside M|acintosh|
|00000090| 3a 0d 44 65 76 69 63 65 | 73 0d f0 09 41 70 70 6c |:.Device|s...Appl|
|000000a0| 65 20 43 6f 6d 70 75 74 | 65 72 2c 20 49 6e 63 2e |e Comput|er, Inc.|
|000000b0| 20 0d a9 20 31 39 39 31 | 2c 20 41 70 70 6c 65 20 | .. 1991|, Apple |
|000000c0| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 0d 41 |Computer|, Inc..A|
|000000d0| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|000000e0| 65 64 2e 0d 50 72 69 6e | 74 65 64 20 69 6e 20 74 |ed..Prin|ted in t|
|000000f0| 68 65 20 55 6e 69 74 65 | 64 20 53 74 61 74 65 73 |he Unite|d States|
|00000100| 20 6f 66 20 0d 41 6d 65 | 72 69 63 61 2e 0d 54 68 | of .Ame|rica..Th|
|00000110| 65 20 41 70 70 6c 65 20 | 6c 6f 67 6f 20 69 73 20 |e Apple |logo is |
|00000120| 61 20 72 65 67 69 73 74 | 65 72 65 64 20 74 72 61 |a regist|ered tra|
|00000130| 64 65 6d 61 72 6b 20 6f | 66 20 41 70 70 6c 65 20 |demark o|f Apple |
|00000140| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 20 55 |Computer|, Inc. U|
|00000150| 73 65 20 6f 66 20 74 68 | 65 20 d2 6b 65 79 62 6f |se of th|e .keybo|
|00000160| 61 72 64 d3 20 0d 41 70 | 70 6c 65 20 6c 6f 67 6f |ard. .Ap|ple logo|
|00000170| 20 28 4f 70 74 69 6f 6e | 2d 53 68 69 66 74 2d 4b | (Option|-Shift-K|
|00000180| 29 20 66 6f 72 20 63 6f | 6d 6d 65 72 63 69 61 6c |) for co|mmercial|
|00000190| 20 70 75 72 70 6f 73 65 | 73 20 77 69 74 68 6f 75 | purpose|s withou|
|000001a0| 74 20 74 68 65 20 70 72 | 69 6f 72 20 77 72 69 74 |t the pr|ior writ|
|000001b0| 74 65 6e 20 63 6f 6e 73 | 65 6e 74 20 6f 66 20 0d |ten cons|ent of .|
|000001c0| 41 70 70 6c 65 20 6d 61 | 79 20 63 6f 6e 73 74 69 |Apple ma|y consti|
|000001d0| 74 75 74 65 20 74 72 61 | 64 65 6d 61 72 6b 20 69 |tute tra|demark i|
|000001e0| 6e 66 72 69 6e 67 65 6d | 65 6e 74 20 61 6e 64 20 |nfringem|ent and |
|000001f0| 75 6e 66 61 69 72 20 63 | 6f 6d 70 65 2d 74 69 74 |unfair c|ompe-tit|
|00000200| 69 6f 6e 20 69 6e 20 76 | 69 6f 6c 61 74 69 6f 6e |ion in v|iolation|
|00000210| 20 6f 66 20 66 65 64 65 | 72 61 6c 20 61 6e 64 20 | of fede|ral and |
|00000220| 73 74 61 74 65 20 6c 61 | 77 73 2e 0d 41 70 70 6c |state la|ws..Appl|
|00000230| 65 20 43 6f 6d 70 75 74 | 65 72 2c 20 49 6e 63 2e |e Comput|er, Inc.|
|00000240| 20 0d 32 30 35 32 35 20 | 4d 61 72 69 61 6e 69 20 | .20525 |Mariani |
|00000250| 41 76 65 6e 75 65 20 20 | 0d 43 75 70 65 72 74 69 |Avenue |.Cuperti|
|00000260| 6e 6f 2c 20 43 41 20 20 | 39 35 30 31 34 2d 36 32 |no, CA |95014-62|
|00000270| 39 39 0d 34 30 38 2d 39 | 39 36 2d 31 30 31 30 20 |99.408-9|96-1010 |
|00000280| 20 0d 41 70 70 6c 65 2c | 20 74 68 65 20 41 70 70 | .Apple,| the App|
|00000290| 6c 65 20 6c 6f 67 6f 2c | 20 41 50 44 41 2c 20 41 |le logo,| APDA, A|
|000002a0| 70 70 6c 65 4c 69 6e 6b | 2c 20 41 70 70 6c 65 53 |ppleLink|, AppleS|
|000002b0| 68 61 72 65 2c 20 0d 41 | 70 70 6c 65 54 61 6c 6b |hare, .A|ppleTalk|
|000002c0| 2c 20 41 70 70 6c 65 20 | 49 49 47 53 2c 20 41 2f |, Apple |IIGS, A/|
|000002d0| 55 58 2c 20 45 74 68 65 | 72 54 61 6c 6b 2c 20 48 |UX, Ethe|rTalk, H|
|000002e0| 79 70 65 72 43 61 72 64 | 2c 20 48 79 70 65 72 2d |yperCard|, Hyper-|
|000002f0| 54 61 6c 6b 2c 20 49 6d | 61 67 65 57 72 69 74 65 |Talk, Im|ageWrite|
|00000300| 72 2c 20 4c 61 73 65 72 | 57 72 69 74 65 72 2c 20 |r, Laser|Writer, |
|00000310| 4c 6f 63 61 6c 54 61 6c | 6b 2c 20 4d 61 63 2c 20 |LocalTal|k, Mac, |
|00000320| 4d 61 63 69 6e 74 6f 73 | 68 2c 20 4d 50 57 2c 20 |Macintos|h, MPW, |
|00000330| 4d 75 6c 74 69 46 69 6e | 64 65 72 2c 20 53 41 4e |MultiFin|der, SAN|
|00000340| 45 2c 20 61 6e 64 20 54 | 6f 6b 65 6e 54 61 6c 6b |E, and T|okenTalk|
|00000350| 20 61 72 65 20 72 65 67 | 69 73 74 65 72 65 64 20 | are reg|istered |
|00000360| 74 72 61 64 65 2d 6d 61 | 72 6b 73 20 6f 66 20 41 |trade-ma|rks of A|
|00000370| 70 70 6c 65 20 43 6f 6d | 70 75 74 65 72 2c 20 49 |pple Com|puter, I|
|00000380| 6e 63 2e 0d 41 70 70 6c | 65 20 44 65 73 6b 74 6f |nc..Appl|e Deskto|
|00000390| 70 20 42 75 73 2c 20 42 | 61 6c 6c 6f 6f 6e 20 48 |p Bus, B|alloon H|
|000003a0| 65 6c 70 2c 20 46 69 6e | 64 65 72 2c 20 4b 61 6e |elp, Fin|der, Kan|
|000003b0| 6a 69 54 61 6c 6b 2c 20 | 4d 6f 6f 66 2c 20 51 75 |jiTalk, |Moof, Qu|
|000003c0| 69 63 6b 44 72 61 77 2c | 20 52 65 73 45 64 69 74 |ickDraw,| ResEdit|
|000003d0| 2c 20 54 72 75 65 54 79 | 70 65 2c 20 61 6e 64 20 |, TrueTy|pe, and |
|000003e0| 5a 68 6f 6e 67 2d 57 65 | 6e 20 54 61 6c 6b 20 61 |Zhong-We|n Talk a|
|000003f0| 72 65 20 74 72 61 64 65 | 2d 6d 61 72 6b 73 20 6f |re trade|-marks o|
|00000400| 66 20 41 70 70 6c 65 20 | 43 6f 6d 70 75 74 65 72 |f Apple |Computer|
|00000410| 2c 20 49 6e 63 2e 0d 48 | 65 6c 76 65 74 69 63 61 |, Inc..H|elvetica|
|00000420| 20 61 6e 64 20 54 69 6d | 65 73 20 61 72 65 20 0d | and Tim|es are .|
|00000430| 72 65 67 69 73 74 65 72 | 65 64 20 74 72 61 64 65 |register|ed trade|
|00000440| 6d 61 72 6b 73 20 6f 66 | 20 0d 4c 69 6e 6f 74 79 |marks of| .Linoty|
|00000450| 70 65 20 43 6f 6d 70 61 | 6e 79 2e 0d 49 54 43 20 |pe Compa|ny..ITC |
|00000460| 5a 61 70 66 20 44 69 6e | 67 62 61 74 73 20 69 73 |Zapf Din|gbats is|
|00000470| 20 61 20 72 65 67 69 73 | 74 65 72 65 64 20 74 72 | a regis|tered tr|
|00000480| 61 64 65 6d 61 72 6b 20 | 6f 66 20 49 6e 74 65 72 |ademark |of Inter|
|00000490| 6e 61 74 69 6f 6e 61 6c | 20 54 79 70 65 66 61 63 |national| Typefac|
|000004a0| 65 20 43 6f 72 70 6f 72 | 61 74 69 6f 6e 2e 0d 4d |e Corpor|ation..M|
|000004b0| 61 63 50 61 69 6e 74 20 | 69 73 20 61 20 72 65 67 |acPaint |is a reg|
|000004c0| 69 73 74 65 72 65 64 20 | 74 72 61 64 65 2d 6d 61 |istered |trade-ma|
|000004d0| 72 6b 20 6f 66 20 43 6c | 61 72 69 73 20 43 6f 72 |rk of Cl|aris Cor|
|000004e0| 70 6f 72 61 74 69 6f 6e | 2e 0d 4e 75 42 75 73 20 |poration|..NuBus |
|000004f0| 69 73 20 61 20 74 72 61 | 64 65 6d 61 72 6b 20 6f |is a tra|demark o|
|00000500| 66 20 54 65 78 61 73 20 | 0d 49 6e 73 74 72 75 6d |f Texas |.Instrum|
|00000510| 65 6e 74 73 2e 0d 50 6f | 73 74 53 63 72 69 70 74 |ents..Po|stScript|
|00000520| 20 69 73 20 61 20 72 65 | 67 69 73 74 65 72 65 64 | is a re|gistered|
|00000530| 20 74 72 61 64 65 2d 6d | 61 72 6b 2c 20 61 6e 64 | trade-m|ark, and|
|00000540| 20 49 6c 6c 75 73 74 72 | 61 74 6f 72 20 69 73 20 | Illustr|ator is |
|00000550| 61 20 0d 74 72 61 64 65 | 6d 61 72 6b 2c 20 6f 66 |a .trade|mark, of|
|00000560| 20 41 64 6f 62 65 20 53 | 79 73 74 65 6d 73 20 0d | Adobe S|ystems .|
|00000570| 49 6e 63 6f 72 70 6f 72 | 61 74 65 64 2e 0d 53 6f |Incorpor|ated..So|
|00000580| 6e 79 20 69 73 20 61 20 | 72 65 67 69 73 74 65 72 |ny is a |register|
|00000590| 65 64 20 74 72 61 64 65 | 6d 61 72 6b 20 6f 66 20 |ed trade|mark of |
|000005a0| 53 6f 6e 79 20 43 6f 72 | 70 6f 72 61 74 69 6f 6e |Sony Cor|poration|
|000005b0| 2e 0d 55 4e 49 58 20 69 | 73 20 61 20 72 65 67 69 |..UNIX i|s a regi|
|000005c0| 73 74 65 72 65 64 20 74 | 72 61 64 65 6d 61 72 6b |stered t|rademark|
|000005d0| 20 6f 66 20 55 4e 49 58 | 20 53 79 73 74 65 6d 20 | of UNIX| System |
|000005e0| 4c 61 62 6f 72 61 74 6f | 72 69 65 73 2c 20 49 6e |Laborato|ries, In|
|000005f0| 63 2e 0d 53 69 6d 75 6c | 74 61 6e 65 6f 75 73 6c |c..Simul|taneousl|
|00000600| 79 20 70 75 62 6c 69 73 | 68 65 64 20 69 6e 20 74 |y publis|hed in t|
|00000610| 68 65 20 55 6e 69 74 65 | 64 20 53 74 61 74 65 73 |he Unite|d States|
|00000620| 20 61 6e 64 20 43 61 6e | 61 64 61 2e 0d 4c 69 6d | and Can|ada..Lim|
|00000630| 69 74 65 64 20 57 61 72 | 72 61 6e 74 79 20 6f 6e |ited War|ranty on|
|00000640| 20 4d 65 64 69 61 20 61 | 6e 64 20 52 65 70 6c 61 | Media a|nd Repla|
|00000650| 63 65 6d 65 6e 74 0d 45 | 76 65 6e 20 74 68 6f 75 |cement.E|ven thou|
|00000660| 67 68 20 41 70 70 6c 65 | 20 68 61 73 20 0d 72 65 |gh Apple| has .re|
|00000670| 76 69 65 77 65 64 20 74 | 68 69 73 20 6d 61 6e 75 |viewed t|his manu|
|00000680| 61 6c 2c 20 41 50 50 4c | 45 20 4d 41 4b 45 53 20 |al, APPL|E MAKES |
|00000690| 4e 4f 20 57 41 52 52 41 | 4e 54 59 20 4f 52 20 52 |NO WARRA|NTY OR R|
|000006a0| 45 50 52 45 53 45 4e 54 | 41 54 49 4f 4e 2c 20 45 |EPRESENT|ATION, E|
|000006b0| 49 54 48 45 52 20 45 58 | 50 52 45 53 53 20 4f 52 |ITHER EX|PRESS OR|
|000006c0| 20 49 4d 50 4c 49 45 44 | 2c 20 57 49 54 48 20 52 | IMPLIED|, WITH R|
|000006d0| 45 53 50 45 43 54 20 54 | 4f 20 54 48 49 53 20 4d |ESPECT T|O THIS M|
|000006e0| 41 4e 55 41 4c 2c 20 49 | 54 53 20 51 55 41 4c 49 |ANUAL, I|TS QUALI|
|000006f0| 54 59 2c 20 41 43 43 55 | 52 41 43 59 2c 20 4d 45 |TY, ACCU|RACY, ME|
|00000700| 52 43 48 41 4e 54 2d 41 | 42 49 4c 49 54 59 2c 20 |RCHANT-A|BILITY, |
|00000710| 4f 52 20 46 49 54 4e 45 | 53 53 20 46 4f 52 20 41 |OR FITNE|SS FOR A|
|00000720| 20 50 41 52 54 49 43 55 | 4c 41 52 20 50 55 52 50 | PARTICU|LAR PURP|
|00000730| 4f 53 45 2e 20 41 53 20 | 41 20 52 45 53 55 4c 54 |OSE. AS |A RESULT|
|00000740| 2c 20 54 48 49 53 20 0d | 4d 41 4e 55 41 4c 20 49 |, THIS .|MANUAL I|
|00000750| 53 20 53 4f 4c 44 20 d2 | 41 53 20 0d 49 53 2c d3 |S SOLD .|AS .IS,.|
|00000760| 20 41 4e 44 20 59 4f 55 | 2c 20 54 48 45 20 50 55 | AND YOU|, THE PU|
|00000770| 52 2d 43 48 41 53 45 52 | 2c 20 41 52 45 20 41 53 |R-CHASER|, ARE AS|
|00000780| 53 55 4d 49 4e 47 20 54 | 48 45 20 45 4e 54 49 52 |SUMING T|HE ENTIR|
|00000790| 45 20 52 49 53 4b 20 41 | 53 20 54 4f 20 49 54 53 |E RISK A|S TO ITS|
|000007a0| 20 51 55 41 4c 49 54 59 | 20 41 4e 44 20 0d 41 43 | QUALITY| AND .AC|
|000007b0| 43 55 52 41 43 59 2e 20 | 20 0d 49 4e 20 4e 4f 20 |CURACY. | .IN NO |
|000007c0| 45 56 45 4e 54 20 57 49 | 4c 4c 20 41 50 50 4c 45 |EVENT WI|LL APPLE|
|000007d0| 20 42 45 20 4c 49 41 42 | 4c 45 20 46 4f 52 20 44 | BE LIAB|LE FOR D|
|000007e0| 49 52 45 43 54 2c 20 0d | 49 4e 44 49 52 45 43 54 |IRECT, .|INDIRECT|
|000007f0| 2c 20 53 50 45 43 49 41 | 4c 2c 20 0d 49 4e 43 49 |, SPECIA|L, .INCI|
|00000800| 44 45 4e 54 41 4c 2c 20 | 4f 52 20 43 4f 4e 53 45 |DENTAL, |OR CONSE|
|00000810| 2d 51 55 45 4e 54 49 41 | 4c 20 44 41 4d 41 47 45 |-QUENTIA|L DAMAGE|
|00000820| 53 20 0d 52 45 53 55 4c | 54 49 4e 47 20 46 52 4f |S .RESUL|TING FRO|
|00000830| 4d 20 41 4e 59 20 0d 44 | 45 46 45 43 54 20 4f 52 |M ANY .D|EFECT OR|
|00000840| 20 49 4e 41 43 43 55 52 | 41 43 59 20 49 4e 20 54 | INACCUR|ACY IN T|
|00000850| 48 49 53 20 4d 41 4e 55 | 41 4c 2c 20 65 76 65 6e |HIS MANU|AL, even|
|00000860| 20 69 66 20 61 64 76 69 | 73 65 64 20 6f 66 20 74 | if advi|sed of t|
|00000870| 68 65 20 70 6f 73 73 69 | 62 69 6c 69 74 79 20 6f |he possi|bility o|
|00000880| 66 20 73 75 63 68 20 64 | 61 6d 61 67 65 73 2e 20 |f such d|amages. |
|00000890| 20 0d 54 48 45 20 57 41 | 52 52 41 4e 54 59 20 41 | .THE WA|RRANTY A|
|000008a0| 4e 44 20 52 45 4d 45 44 | 49 45 53 20 53 45 54 20 |ND REMED|IES SET |
|000008b0| 46 4f 52 54 48 20 41 42 | 4f 56 45 20 41 52 45 20 |FORTH AB|OVE ARE |
|000008c0| 45 58 43 4c 55 53 49 56 | 45 20 41 4e 44 20 49 4e |EXCLUSIV|E AND IN|
|000008d0| 20 4c 49 45 55 20 4f 46 | 20 41 4c 4c 20 0d 4f 54 | LIEU OF| ALL .OT|
|000008e0| 48 45 52 53 2c 20 4f 52 | 41 4c 20 4f 52 20 0d 57 |HERS, OR|AL OR .W|
|000008f0| 52 49 54 54 45 4e 2c 20 | 45 58 50 52 45 53 53 20 |RITTEN, |EXPRESS |
|00000900| 4f 52 20 0d 49 4d 50 4c | 49 45 44 2e 20 4e 6f 20 |OR .IMPL|IED. No |
|00000910| 41 70 70 6c 65 20 64 65 | 61 6c 65 72 2c 20 61 67 |Apple de|aler, ag|
|00000920| 65 6e 74 2c 20 6f 72 20 | 65 6d 70 6c 6f 79 65 65 |ent, or |employee|
|00000930| 20 69 73 20 0d 61 75 74 | 68 6f 72 69 7a 65 64 20 | is .aut|horized |
|00000940| 74 6f 20 6d 61 6b 65 20 | 61 6e 79 20 0d 6d 6f 64 |to make |any .mod|
|00000950| 69 66 69 63 61 74 69 6f | 6e 2c 20 65 78 74 65 6e |ificatio|n, exten|
|00000960| 73 69 6f 6e 2c 20 6f 72 | 20 0d 61 64 64 69 74 69 |sion, or| .additi|
|00000970| 6f 6e 20 74 6f 20 74 68 | 69 73 20 77 61 72 72 61 |on to th|is warra|
|00000980| 6e 74 79 2e 20 20 0d 53 | 6f 6d 65 20 73 74 61 74 |nty. .S|ome stat|
|00000990| 65 73 20 64 6f 20 6e 6f | 74 20 61 6c 6c 6f 77 20 |es do no|t allow |
|000009a0| 74 68 65 20 65 78 63 6c | 75 73 69 6f 6e 20 6f 72 |the excl|usion or|
|000009b0| 20 6c 69 6d 69 74 61 74 | 69 6f 6e 20 6f 66 20 0d | limitat|ion of .|
|000009c0| 69 6d 70 6c 69 65 64 20 | 77 61 72 72 61 6e 74 69 |implied |warranti|
|000009d0| 65 73 20 6f 72 20 6c 69 | 61 62 69 6c 69 74 79 20 |es or li|ability |
|000009e0| 66 6f 72 20 69 6e 63 69 | 64 65 6e 74 61 6c 20 6f |for inci|dental o|
|000009f0| 72 20 63 6f 6e 73 65 71 | 75 65 6e 74 69 61 6c 20 |r conseq|uential |
|00000a00| 64 61 6d 61 67 65 73 2c | 20 73 6f 20 74 68 65 20 |damages,| so the |
|00000a10| 61 62 6f 76 65 20 0d 6c | 69 6d 69 74 61 74 69 6f |above .l|imitatio|
|00000a20| 6e 20 6f 72 20 65 78 63 | 6c 75 73 69 6f 6e 20 6d |n or exc|lusion m|
|00000a30| 61 79 20 6e 6f 74 20 61 | 70 70 6c 79 20 74 6f 20 |ay not a|pply to |
|00000a40| 79 6f 75 2e 20 54 68 69 | 73 20 77 61 72 72 61 6e |you. Thi|s warran|
|00000a50| 74 79 20 67 69 76 65 73 | 20 79 6f 75 20 73 70 65 |ty gives| you spe|
|00000a60| 63 69 66 69 63 20 6c 65 | 67 61 6c 20 72 69 67 68 |cific le|gal righ|
|00000a70| 74 73 2c 20 61 6e 64 20 | 79 6f 75 20 6d 61 79 20 |ts, and |you may |
|00000a80| 61 6c 73 6f 20 68 61 76 | 65 20 6f 74 68 65 72 20 |also hav|e other |
|00000a90| 72 69 67 68 74 73 20 77 | 68 69 63 68 20 76 61 72 |rights w|hich var|
|00000aa0| 79 20 66 72 6f 6d 20 73 | 74 61 74 65 20 74 6f 20 |y from s|tate to |
|00000ab0| 73 74 61 74 65 2e 0d 54 | 68 65 20 44 65 76 69 63 |state..T|he Devic|
|00000ac0| 65 20 4d 61 6e 61 67 65 | 72 0d 49 6e 74 72 6f 64 |e Manage|r.Introd|
|00000ad0| 75 63 74 69 6f 6e 20 74 | 6f 20 44 65 76 69 63 65 |uction t|o Device|
|00000ae0| 73 20 61 6e 64 20 44 72 | 69 76 65 72 73 14 14 31 |s and Dr|ivers..1|
|00000af0| 2d 33 0d 41 62 6f 75 74 | 20 74 68 65 20 44 65 76 |-3.About| the Dev|
|00000b00| 69 63 65 20 4d 61 6e 61 | 67 65 72 14 14 31 2d 34 |ice Mana|ger..1-4|
|00000b10| 0d 55 73 69 6e 67 20 74 | 68 65 20 44 65 76 69 63 |.Using t|he Devic|
|00000b20| 65 20 4d 61 6e 61 67 65 | 72 14 14 31 2d 37 0d 4f |e Manage|r..1-7.O|
|00000b30| 70 65 6e 69 6e 67 20 61 | 6e 64 20 43 6c 6f 73 69 |pening a|nd Closi|
|00000b40| 6e 67 20 44 65 76 69 63 | 65 20 44 72 69 76 65 72 |ng Devic|e Driver|
|00000b50| 73 14 14 31 2d 38 0d 43 | 6f 6d 6d 75 6e 69 63 61 |s..1-8.C|ommunica|
|00000b60| 74 69 6e 67 20 57 69 74 | 68 20 44 65 76 69 63 65 |ting Wit|h Device|
|00000b70| 20 44 72 69 76 65 72 73 | 14 14 31 2d 31 30 0d 43 | Drivers|..1-10.C|
|00000b80| 6f 6e 74 72 6f 6c 6c 69 | 6e 67 20 61 6e 64 20 4d |ontrolli|ng and M|
|00000b90| 6f 6e 69 74 6f 72 69 6e | 67 20 44 65 76 69 63 65 |onitorin|g Device|
|00000ba0| 20 44 72 69 76 65 72 73 | 14 14 31 2d 31 33 0d 52 | Drivers|..1-13.R|
|00000bb0| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 74 68 65 20 |eference| to the |
|00000bc0| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 14 14 |Device M|anager..|
|00000bd0| 31 2d 31 35 0d 44 61 74 | 61 20 53 74 72 75 63 74 |1-15.Dat|a Struct|
|00000be0| 75 72 65 73 14 14 31 2d | 31 35 0d 52 6f 75 74 69 |ures..1-|15.Routi|
|00000bf0| 6e 65 73 14 14 31 2d 31 | 38 0d 4f 70 65 6e 69 6e |nes..1-1|8.Openin|
|00000c00| 67 20 61 6e 64 20 43 6c | 6f 73 69 6e 67 20 44 65 |g and Cl|osing De|
|00000c10| 76 69 63 65 20 44 72 69 | 76 65 72 73 14 14 31 2d |vice Dri|vers..1-|
|00000c20| 31 38 0d 52 65 61 64 69 | 6e 67 20 46 72 6f 6d 20 |18.Readi|ng From |
|00000c30| 61 6e 64 20 57 72 69 74 | 69 6e 67 20 54 6f 20 44 |and Writ|ing To D|
|00000c40| 65 76 69 63 65 73 14 14 | 31 2d 32 35 0d 43 6f 6e |evices..|1-25.Con|
|00000c50| 74 72 6f 6c 6c 69 6e 67 | 20 61 6e 64 20 4d 6f 6e |trolling| and Mon|
|00000c60| 69 74 6f 72 69 6e 67 20 | 44 65 76 69 63 65 73 14 |itoring |Devices.|
|00000c70| 14 31 2d 33 31 0d 53 75 | 6d 6d 61 72 79 20 6f 66 |.1-31.Su|mmary of|
|00000c80| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00000c90| 67 65 72 14 14 31 2d 33 | 39 0d 31 54 68 65 20 44 |ger..1-3|9.1The D|
|00000ca0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 0d 54 68 |evice Ma|nager.Th|
|00000cb0| 69 73 20 63 68 61 70 74 | 65 72 20 64 65 73 63 72 |is chapt|er descr|
|00000cc0| 69 62 65 73 20 68 6f 77 | 20 79 6f 75 72 20 61 70 |ibes how| your ap|
|00000cd0| 70 6c 69 63 61 74 69 6f | 6e 20 63 61 6e 20 75 73 |plicatio|n can us|
|00000ce0| 65 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |e the De|vice Man|
|00000cf0| 61 67 65 72 20 74 6f 20 | 74 72 61 6e 73 66 65 72 |ager to |transfer|
|00000d00| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 6e 74 | informa|tion int|
|00000d10| 6f 20 61 6e 64 20 6f 75 | 74 20 6f 66 20 74 68 65 |o and ou|t of the|
|00000d20| 20 4d 61 63 69 6e 74 6f | 73 68 2e 20 54 68 65 20 | Macinto|sh. The |
|00000d30| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 63 |Device M|anager c|
|00000d40| 6f 6e 74 72 6f 6c 73 20 | 74 68 65 20 65 78 63 68 |ontrols |the exch|
|00000d50| 61 6e 67 65 20 6f 66 20 | 69 6e 66 6f 72 6d 61 74 |ange of |informat|
|00000d60| 69 6f 6e 20 62 65 74 77 | 65 65 6e 20 61 70 70 6c |ion betw|een appl|
|00000d70| 69 63 61 74 69 6f 6e 73 | 20 61 6e 64 20 68 61 72 |ications| and har|
|00000d80| 64 77 61 72 65 20 64 65 | 76 69 63 65 73 2e 20 4f |dware de|vices. O|
|00000d90| 66 74 65 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ften app|lication|
|00000da0| 73 20 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 77 69 |s commun|icate wi|
|00000db0| 74 68 20 74 68 65 20 44 | 65 76 69 63 65 20 4d 61 |th the D|evice Ma|
|00000dc0| 6e 61 67 65 72 20 69 6e | 64 69 72 65 63 74 6c 79 |nager in|directly|
|00000dd0| 2c 20 62 79 20 63 61 6c | 6c 69 6e 67 20 72 6f 75 |, by cal|ling rou|
|00000de0| 74 69 6e 65 73 20 6f 66 | 20 6f 74 68 65 72 20 6d |tines of| other m|
|00000df0| 61 6e 61 67 65 72 73 20 | 28 66 6f 72 20 65 78 61 |anagers |(for exa|
|00000e00| 6d 70 6c 65 2c 20 74 68 | 65 20 46 69 6c 65 20 4d |mple, th|e File M|
|00000e10| 61 6e 61 67 65 72 29 20 | 77 68 69 63 68 20 75 73 |anager) |which us|
|00000e20| 65 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |e the De|vice Man|
|00000e30| 61 67 65 72 2e 20 48 6f | 77 65 76 65 72 2c 20 73 |ager. Ho|wever, s|
|00000e40| 6f 6d 65 74 69 6d 65 73 | 20 61 70 70 6c 69 63 61 |ometimes| applica|
|00000e50| 74 69 6f 6e 73 20 6d 75 | 73 74 20 63 61 6c 6c 20 |tions mu|st call |
|00000e60| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 72 |Device M|anager r|
|00000e70| 6f 75 74 69 6e 65 73 20 | 64 69 72 65 63 74 6c 79 |outines |directly|
|00000e80| 2e 0d 52 65 61 64 20 74 | 68 65 20 69 6e 66 6f 72 |..Read t|he infor|
|00000e90| 6d 61 74 69 6f 6e 20 69 | 6e 20 74 68 69 73 20 63 |mation i|n this c|
|00000ea0| 68 61 70 74 65 72 20 69 | 66 20 79 6f 75 72 20 61 |hapter i|f your a|
|00000eb0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 6e 65 65 64 73 |pplicati|on needs|
|00000ec0| 20 74 6f 20 75 73 65 20 | 74 68 65 20 44 65 76 69 | to use |the Devi|
|00000ed0| 63 65 20 4d 61 6e 61 67 | 65 72 20 74 6f 20 63 6f |ce Manag|er to co|
|00000ee0| 6d 6d 75 6e 69 63 61 74 | 65 20 77 69 74 68 20 61 |mmunicat|e with a|
|00000ef0| 20 64 65 76 69 63 65 2e | 20 46 6f 72 20 65 78 61 | device.| For exa|
|00000f00| 6d 70 6c 65 2c 20 79 6f | 75 20 6d 69 67 68 74 20 |mple, yo|u might |
|00000f10| 6e 65 65 64 20 74 6f 20 | 75 73 65 20 74 68 65 20 |need to |use the |
|00000f20| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 74 |Device M|anager t|
|00000f30| 6f 20 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 77 69 |o commun|icate wi|
|00000f40| 74 68 20 61 20 6d 6f 64 | 65 6d 20 64 65 76 69 63 |th a mod|em devic|
|00000f50| 65 20 6f 6e 20 61 6e 20 | 65 78 70 61 6e 73 69 6f |e on an |expansio|
|00000f60| 6e 20 63 61 72 64 2e 20 | 59 6f 75 20 77 6f 75 6c |n card. |You woul|
|00000f70| 64 20 70 72 6f 62 61 62 | 6c 79 20 6e 6f 74 20 6e |d probab|ly not n|
|00000f80| 65 65 64 20 74 6f 20 75 | 73 65 20 74 68 65 20 44 |eed to u|se the D|
|00000f90| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 74 6f |evice Ma|nager to|
|00000fa0| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 65 20 77 69 74 | communi|cate wit|
|00000fb0| 68 20 61 20 67 72 61 70 | 68 69 63 73 20 64 65 76 |h a grap|hics dev|
|00000fc0| 69 63 65 20 6f 6e 20 61 | 6e 20 65 78 70 61 6e 73 |ice on a|n expans|
|00000fd0| 69 6f 6e 20 63 61 72 64 | 2c 20 61 73 20 79 6f 75 |ion card|, as you|
|00000fe0| 20 77 6f 75 6c 64 20 75 | 73 65 20 51 75 69 63 6b | would u|se Quick|
|00000ff0| 44 72 61 77 20 69 6e 73 | 74 65 61 64 2e 20 59 6f |Draw ins|tead. Yo|
|00001000| 75 20 61 6c 73 6f 20 64 | 6f 20 6e 6f 74 20 6e 65 |u also d|o not ne|
|00001010| 65 64 20 74 6f 20 75 73 | 65 20 74 68 65 20 44 65 |ed to us|e the De|
|00001020| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 64 69 72 |vice Man|ager dir|
|00001030| 65 63 74 6c 79 20 74 6f | 20 63 6f 6d 6d 75 6e 69 |ectly to| communi|
|00001040| 63 61 74 65 20 77 69 74 | 68 20 64 69 73 6b 20 64 |cate wit|h disk d|
|00001050| 72 69 76 65 73 20 6f 72 | 20 70 72 69 6e 74 65 72 |rives or| printer|
|00001060| 73 2c 20 61 73 20 79 6f | 75 20 63 61 6e 20 75 73 |s, as yo|u can us|
|00001070| 65 20 74 68 65 20 46 69 | 6c 65 20 4d 61 6e 61 67 |e the Fi|le Manag|
|00001080| 65 72 20 6f 72 20 74 68 | 65 20 50 72 69 6e 74 69 |er or th|e Printi|
|00001090| 6e 67 20 4d 61 6e 61 67 | 65 72 2e 0d 54 6f 20 75 |ng Manag|er..To u|
|000010a0| 73 65 20 74 68 69 73 20 | 63 68 61 70 74 65 72 2c |se this |chapter,|
|000010b0| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 62 65 20 66 | you sho|uld be f|
|000010c0| 61 6d 69 6c 69 61 72 20 | 77 69 74 68 20 72 65 73 |amiliar |with res|
|000010d0| 6f 75 72 63 65 73 20 61 | 6e 64 20 68 6f 77 20 74 |ources a|nd how t|
|000010e0| 68 65 20 73 79 73 74 65 | 6d 20 73 65 61 72 63 68 |he syste|m search|
|000010f0| 65 73 20 72 65 73 6f 75 | 72 63 65 20 66 69 6c 65 |es resou|rce file|
|00001100| 73 2e 20 53 65 65 20 74 | 68 65 20 63 68 61 70 74 |s. See t|he chapt|
|00001110| 65 72 20 d2 54 68 65 20 | 52 65 73 6f 75 72 63 65 |er .The |Resource|
|00001120| 20 4d 61 6e 61 67 65 72 | d3 20 69 6e 20 74 68 65 | Manager|. in the|
|00001130| 20 49 6e 73 69 64 65 20 | 4d 61 63 69 6e 74 6f 73 | Inside |Macintos|
|00001140| 68 3a 20 4d 61 63 69 6e | 74 6f 73 68 20 54 6f 6f |h: Macin|tosh Too|
|00001150| 6c 62 6f 78 20 76 6f 6c | 75 6d 65 2e 0d 54 68 69 |lbox vol|ume..Thi|
|00001160| 73 20 63 68 61 70 74 65 | 72 20 69 6e 63 6c 75 64 |s chapte|r includ|
|00001170| 65 73 0d 6e 09 61 20 62 | 72 69 65 66 20 69 6e 74 |es.n.a b|rief int|
|00001180| 72 6f 64 75 63 74 69 6f | 6e 20 74 6f 20 64 65 76 |roductio|n to dev|
|00001190| 69 63 65 73 20 61 6e 64 | 20 64 65 76 69 63 65 20 |ices and| device |
|000011a0| 64 72 69 76 65 72 73 20 | 28 74 68 65 20 70 72 6f |drivers |(the pro|
|000011b0| 67 72 61 6d 73 20 74 68 | 61 74 20 63 6f 6e 74 72 |grams th|at contr|
|000011c0| 6f 6c 20 64 65 76 69 63 | 65 73 29 0d 6e 09 61 20 |ol devic|es).n.a |
|000011d0| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6f 66 20 74 |descript|ion of t|
|000011e0| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|000011f0| 72 20 61 6e 64 20 68 6f | 77 20 69 74 20 6d 61 6e |r and ho|w it man|
|00001200| 61 67 65 73 20 64 65 76 | 69 63 65 20 64 72 69 76 |ages dev|ice driv|
|00001210| 65 72 73 20 0d 6e 09 61 | 20 64 69 73 63 75 73 73 |ers .n.a| discuss|
|00001220| 69 6f 6e 20 6f 66 20 68 | 6f 77 20 74 6f 20 75 73 |ion of h|ow to us|
|00001230| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00001240| 20 72 6f 75 74 69 6e 65 | 73 20 74 6f 20 65 78 63 | routine|s to exc|
|00001250| 68 61 6e 67 65 20 69 6e | 66 6f 72 6d 61 74 69 6f |hange in|formatio|
|00001260| 6e 20 77 69 74 68 20 64 | 65 76 69 63 65 73 20 61 |n with d|evices a|
|00001270| 6e 64 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 |nd devic|e driver|
|00001280| 73 0d 59 6f 75 20 63 61 | 6e 20 66 69 6e 64 20 73 |s.You ca|n find s|
|00001290| 70 65 63 69 66 69 63 20 | 69 6e 66 6f 72 6d 61 74 |pecific |informat|
|000012a0| 69 6f 6e 20 61 62 6f 75 | 74 20 74 68 65 20 73 74 |ion abou|t the st|
|000012b0| 61 6e 64 61 72 64 20 4d | 61 63 69 6e 74 6f 73 68 |andard M|acintosh|
|000012c0| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 73 2c | device |drivers,|
|000012d0| 20 6c 69 6b 65 20 74 68 | 65 20 44 69 73 6b 20 44 | like th|e Disk D|
|000012e0| 72 69 76 65 72 20 61 6e | 64 20 74 68 65 20 53 65 |river an|d the Se|
|000012f0| 72 69 61 6c 20 44 72 69 | 76 65 72 73 2c 20 69 6e |rial Dri|vers, in|
|00001300| 20 73 65 70 61 72 61 74 | 65 20 63 68 61 70 74 65 | separat|e chapte|
|00001310| 72 73 20 6f 66 20 74 68 | 69 73 20 62 6f 6f 6b 2e |rs of th|is book.|
|00001320| 20 49 66 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 | If you |want to |
|00001330| 63 72 65 61 74 65 20 79 | 6f 75 72 20 6f 77 6e 20 |create y|our own |
|00001340| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 20 6f 72 |device d|river or|
|00001350| 20 64 65 73 6b 20 61 63 | 63 65 73 73 6f 72 79 2c | desk ac|cessory,|
|00001360| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 66 69 72 73 | you sho|uld firs|
|00001370| 74 20 72 65 61 64 20 74 | 68 69 73 20 63 68 61 70 |t read t|his chap|
|00001380| 74 65 72 20 61 6e 64 20 | 74 68 65 6e 20 72 65 61 |ter and |then rea|
|00001390| 64 20 74 68 65 20 63 68 | 61 70 74 65 72 20 d2 57 |d the ch|apter .W|
|000013a0| 72 69 74 69 6e 67 20 59 | 6f 75 72 20 4f 77 6e 20 |riting Y|our Own |
|000013b0| 44 65 76 69 63 65 20 44 | 72 69 76 65 72 d3 20 69 |Device D|river. i|
|000013c0| 6e 20 74 68 69 73 20 62 | 6f 6f 6b 2e 0d 49 6e 74 |n this b|ook..Int|
|000013d0| 72 6f 64 75 63 74 69 6f | 6e 20 74 6f 20 44 65 76 |roductio|n to Dev|
|000013e0| 69 63 65 73 20 61 6e 64 | 20 44 72 69 76 65 72 73 |ices and| Drivers|
|000013f0| 0d 41 20 64 65 76 69 63 | 65 20 69 73 20 61 20 70 |.A devic|e is a p|
|00001400| 68 79 73 69 63 61 6c 20 | 70 61 72 74 20 6f 66 20 |hysical |part of |
|00001410| 74 68 65 20 4d 61 63 69 | 6e 74 6f 73 68 2c 20 6f |the Maci|ntosh, o|
|00001420| 72 20 61 20 70 69 65 63 | 65 20 6f 66 20 65 78 74 |r a piec|e of ext|
|00001430| 65 72 6e 61 6c 20 65 71 | 75 69 70 6d 65 6e 74 2c |ernal eq|uipment,|
|00001440| 20 74 68 61 74 20 63 61 | 6e 20 65 78 63 68 61 6e | that ca|n exchan|
|00001450| 67 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 77 |ge infor|mation w|
|00001460| 69 74 68 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |ith appl|ications|
|00001470| 20 6f 72 20 77 69 74 68 | 20 74 68 65 20 4f 70 65 | or with| the Ope|
|00001480| 72 61 74 69 6e 67 20 53 | 79 73 74 65 6d 2e 20 49 |rating S|ystem. I|
|00001490| 6e 70 75 74 20 64 65 76 | 69 63 65 73 20 74 72 61 |nput dev|ices tra|
|000014a0| 6e 73 66 65 72 20 69 6e | 66 6f 72 6d 61 74 69 6f |nsfer in|formatio|
|000014b0| 6e 20 69 6e 74 6f 20 74 | 68 65 20 4d 61 63 69 6e |n into t|he Macin|
|000014c0| 74 6f 73 68 2c 20 77 68 | 69 6c 65 20 6f 75 74 70 |tosh, wh|ile outp|
|000014d0| 75 74 20 64 65 76 69 63 | 65 73 20 72 65 63 65 69 |ut devic|es recei|
|000014e0| 76 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 66 |ve infor|mation f|
|000014f0| 72 6f 6d 20 74 68 65 20 | 4d 61 63 69 6e 74 6f 73 |rom the |Macintos|
|00001500| 68 2e 20 41 6e 20 49 2f | 4f 20 64 65 76 69 63 65 |h. An I/|O device|
|00001510| 20 63 61 6e 20 74 72 61 | 6e 73 66 65 72 20 69 6e | can tra|nsfer in|
|00001520| 66 6f 72 6d 61 74 69 6f | 6e 20 69 6e 20 65 69 74 |formatio|n in eit|
|00001530| 68 65 72 20 64 69 72 65 | 63 74 69 6f 6e 2e 0d 44 |her dire|ction..D|
|00001540| 65 76 69 63 65 73 20 74 | 72 61 6e 73 66 65 72 20 |evices t|ransfer |
|00001550| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 6e 20 6f |informat|ion in o|
|00001560| 6e 65 20 6f 66 20 74 77 | 6f 20 77 61 79 73 2e 20 |ne of tw|o ways. |
|00001570| 43 68 61 72 61 63 74 65 | 72 20 64 65 76 69 63 65 |Characte|r device|
|00001580| 73 20 72 65 61 64 20 6f | 72 20 77 72 69 74 65 20 |s read o|r write |
|00001590| 61 20 73 74 72 65 61 6d | 20 6f 66 20 63 68 61 72 |a stream| of char|
|000015a0| 61 63 74 65 72 73 2c 20 | 6f 72 20 62 79 74 65 73 |acters, |or bytes|
|000015b0| 2c 20 6f 6e 65 20 61 74 | 20 61 20 74 69 6d 65 3b |, one at| a time;|
|000015c0| 20 74 68 65 79 20 63 61 | 6e 20 6e 65 69 74 68 65 | they ca|n neithe|
|000015d0| 72 20 73 6b 69 70 20 62 | 79 74 65 73 20 6e 6f 72 |r skip b|ytes nor|
|000015e0| 20 67 6f 20 62 61 63 6b | 20 74 6f 20 70 72 65 76 | go back| to prev|
|000015f0| 69 6f 75 73 20 62 79 74 | 65 73 2e 20 54 68 65 20 |ious byt|es. The |
|00001600| 73 65 72 69 61 6c 20 70 | 6f 72 74 73 20 61 6e 64 |serial p|orts and|
|00001610| 20 70 72 69 6e 74 65 72 | 73 20 61 72 65 20 63 68 | printer|s are ch|
|00001620| 61 72 61 63 74 65 72 20 | 64 65 76 69 63 65 73 2e |aracter |devices.|
|00001630| 0d 42 6c 6f 63 6b 20 64 | 65 76 69 63 65 73 20 72 |.Block d|evices r|
|00001640| 65 61 64 20 61 6e 64 20 | 77 72 69 74 65 20 65 6e |ead and |write en|
|00001650| 74 69 72 65 20 62 6c 6f | 63 6b 73 20 6f 66 20 62 |tire blo|cks of b|
|00001660| 79 74 65 73 20 61 74 20 | 6f 6e 65 20 74 69 6d 65 |ytes at |one time|
|00001670| 3b 20 74 68 65 79 20 63 | 61 6e 20 72 65 61 64 20 |; they c|an read |
|00001680| 6f 72 20 77 72 69 74 65 | 20 61 6e 79 20 61 63 63 |or write| any acc|
|00001690| 65 73 73 69 62 6c 65 20 | 62 6c 6f 63 6b 20 6f 6e |essible |block on|
|000016a0| 20 64 65 6d 61 6e 64 2e | 20 54 68 65 73 65 20 64 | demand.| These d|
|000016b0| 65 76 69 63 65 73 20 61 | 72 65 20 75 73 75 61 6c |evices a|re usual|
|000016c0| 6c 79 20 75 73 65 64 20 | 74 6f 20 73 74 6f 72 65 |ly used |to store|
|000016d0| 20 61 6e 64 20 72 65 74 | 72 69 65 76 65 20 69 6e | and ret|rieve in|
|000016e0| 66 6f 72 6d 61 74 69 6f | 6e 2e 20 44 69 73 6b 20 |formatio|n. Disk |
|000016f0| 64 72 69 76 65 73 20 61 | 72 65 20 62 6c 6f 63 6b |drives a|re block|
|00001700| 20 64 65 76 69 63 65 73 | 2e 0d 44 65 76 69 63 65 | devices|..Device|
|00001710| 73 20 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 77 69 |s commun|icate wi|
|00001720| 74 68 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 20 |th appli|cations |
|00001730| 61 6e 64 20 77 69 74 68 | 20 74 68 65 20 4f 70 65 |and with| the Ope|
|00001740| 72 61 74 69 6e 67 20 53 | 79 73 74 65 6d 20 74 68 |rating S|ystem th|
|00001750| 72 6f 75 67 68 20 73 70 | 65 63 69 61 6c 20 70 72 |rough sp|ecial pr|
|00001760| 6f 67 72 61 6d 73 20 63 | 61 6c 6c 65 64 20 64 65 |ograms c|alled de|
|00001770| 76 69 63 65 20 64 72 69 | 76 65 72 73 2e 20 54 68 |vice dri|vers. Th|
|00001780| 65 73 65 20 64 72 69 76 | 65 72 73 20 61 63 74 20 |ese driv|ers act |
|00001790| 61 73 20 74 72 61 6e 73 | 6c 61 74 6f 72 73 2c 20 |as trans|lators, |
|000017a0| 63 6f 6e 76 65 72 74 69 | 6e 67 20 73 6f 66 74 77 |converti|ng softw|
|000017b0| 61 72 65 20 72 65 71 75 | 65 73 74 73 20 69 6e 74 |are requ|ests int|
|000017c0| 6f 20 68 61 72 64 77 61 | 72 65 20 61 63 74 69 6f |o hardwa|re actio|
|000017d0| 6e 73 20 61 6e 64 20 68 | 61 72 64 77 61 72 65 20 |ns and h|ardware |
|000017e0| 61 63 74 69 6f 6e 73 20 | 69 6e 74 6f 20 73 6f 66 |actions |into sof|
|000017f0| 74 77 61 72 65 20 72 65 | 73 75 6c 74 73 2e 20 41 |tware re|sults. A|
|00001800| 20 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 64 65 76 | synchro|nous dev|
|00001810| 69 63 65 20 64 72 69 76 | 65 72 20 63 6f 6d 70 6c |ice driv|er compl|
|00001820| 65 74 65 73 20 65 61 63 | 68 20 63 6f 6d 6d 75 6e |etes eac|h commun|
|00001830| 69 63 61 74 69 6f 6e 20 | 72 65 71 75 65 73 74 20 |ication |request |
|00001840| 62 65 66 6f 72 65 20 72 | 65 74 75 72 6e 69 6e 67 |before r|eturning|
|00001850| 20 63 6f 6e 74 72 6f 6c | 20 74 6f 20 74 68 65 20 | control| to the |
|00001860| 73 79 73 74 65 6d 2e 20 | 41 6e 20 61 73 79 6e 63 |system. |An async|
|00001870| 68 72 6f 6e 6f 75 73 20 | 64 65 76 69 63 65 20 64 |hronous |device d|
|00001880| 72 69 76 65 72 20 63 61 | 6e 20 69 6e 69 74 69 61 |river ca|n initia|
|00001890| 74 65 20 61 20 64 61 74 | 61 20 74 72 61 6e 73 66 |te a dat|a transf|
|000018a0| 65 72 20 61 6e 64 20 72 | 65 74 75 72 6e 20 63 6f |er and r|eturn co|
|000018b0| 6e 74 72 6f 6c 20 74 6f | 20 74 68 65 20 73 79 73 |ntrol to| the sys|
|000018c0| 74 65 6d 20 62 65 66 6f | 72 65 20 74 68 65 20 65 |tem befo|re the e|
|000018d0| 6e 74 69 72 65 20 74 72 | 61 6e 73 66 65 72 20 69 |ntire tr|ansfer i|
|000018e0| 73 20 63 6f 6d 70 6c 65 | 74 65 2e 20 54 68 69 73 |s comple|te. This|
|000018f0| 20 74 79 70 65 20 6f 66 | 20 64 65 76 69 63 65 20 | type of| device |
|00001900| 64 72 69 76 65 72 20 75 | 73 75 61 6c 6c 79 20 72 |driver u|sually r|
|00001910| 65 6c 69 65 73 20 6f 6e | 20 69 6e 74 65 72 72 75 |elies on| interru|
|00001920| 70 74 73 20 66 72 6f 6d | 20 69 74 73 20 68 61 72 |pts from| its har|
|00001930| 64 77 61 72 65 20 64 65 | 76 69 63 65 20 74 6f 20 |dware de|vice to |
|00001940| 72 65 67 61 69 6e 20 63 | 6f 6e 74 72 6f 6c 20 6f |regain c|ontrol o|
|00001950| 66 20 74 68 65 20 70 72 | 6f 63 65 73 73 6f 72 20 |f the pr|ocessor |
|00001960| 61 6e 64 20 63 6f 6e 74 | 69 6e 75 65 20 6f 72 20 |and cont|inue or |
|00001970| 63 6f 6d 70 6c 65 74 65 | 20 74 68 65 20 64 61 74 |complete| the dat|
|00001980| 61 20 74 72 61 6e 73 66 | 65 72 2e 0d 41 20 64 65 |a transf|er..A de|
|00001990| 76 69 63 65 20 64 72 69 | 76 65 72 20 64 6f 65 73 |vice dri|ver does|
|000019a0| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|000019b0| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|000019c0| 61 20 64 65 76 69 63 65 | 2e 20 49 6e 20 67 65 6e |a device|. In gen|
|000019d0| 65 72 61 6c 2c 20 61 20 | 64 65 76 69 63 65 20 64 |eral, a |device d|
|000019e0| 72 69 76 65 72 20 69 73 | 20 61 20 70 72 6f 67 72 |river is| a progr|
|000019f0| 61 6d 20 74 68 61 74 20 | 63 6f 6e 66 6f 72 6d 73 |am that |conforms|
|00001a00| 20 74 6f 20 61 20 70 72 | 65 64 65 66 69 6e 65 64 | to a pr|edefined|
|00001a10| 20 66 6f 72 6d 61 74 20 | 61 6e 64 20 70 72 6f 67 | format |and prog|
|00001a20| 72 61 6d 6d 69 6e 67 20 | 69 6e 74 65 72 66 61 63 |ramming |interfac|
|00001a30| 65 2e 20 4d 61 6e 79 20 | 64 65 76 69 63 65 20 64 |e. Many |device d|
|00001a40| 72 69 76 65 72 73 20 74 | 61 6b 65 20 61 64 76 61 |rivers t|ake adva|
|00001a50| 6e 74 61 67 65 20 6f 66 | 20 74 68 69 73 20 70 72 |ntage of| this pr|
|00001a60| 65 64 65 66 69 6e 65 64 | 20 69 6e 74 65 72 66 61 |edefined| interfa|
|00001a70| 63 65 20 74 6f 20 70 65 | 72 66 6f 72 6d 20 74 61 |ce to pe|rform ta|
|00001a80| 73 6b 73 20 75 6e 72 65 | 6c 61 74 65 64 20 74 6f |sks unre|lated to|
|00001a90| 20 61 63 74 75 61 6c 20 | 70 68 79 73 69 63 61 6c | actual |physical|
|00001aa0| 20 64 65 76 69 63 65 73 | 2e 20 44 65 73 6b 20 61 | devices|. Desk a|
|00001ab0| 63 63 65 73 73 6f 72 69 | 65 73 20 61 72 65 20 61 |ccessori|es are a|
|00001ac0| 6e 20 65 78 61 6d 70 6c | 65 20 6f 66 20 74 68 69 |n exampl|e of thi|
|00001ad0| 73 20 6b 69 6e 64 20 6f | 66 20 64 65 76 69 63 65 |s kind o|f device|
|00001ae0| 20 64 72 69 76 65 72 2e | 0d 53 6f 6d 65 20 64 65 | driver.|.Some de|
|00001af0| 76 69 63 65 20 64 72 69 | 76 65 72 73 20 61 72 65 |vice dri|vers are|
|00001b00| 20 73 74 6f 72 65 64 20 | 69 6e 20 74 68 65 20 4d | stored |in the M|
|00001b10| 61 63 69 6e 74 6f 73 68 | 20 52 4f 4d 3b 20 6f 74 |acintosh| ROM; ot|
|00001b20| 68 65 72 73 20 61 72 65 | 20 73 74 6f 72 65 64 20 |hers are| stored |
|00001b30| 69 6e 20 64 72 69 76 65 | 72 20 28 27 44 52 56 52 |in drive|r ('DRVR|
|00001b40| 27 29 20 72 65 73 6f 75 | 72 63 65 73 2c 20 77 68 |') resou|rces, wh|
|00001b50| 69 63 68 20 61 72 65 20 | 74 79 70 69 63 61 6c 6c |ich are |typicall|
|00001b60| 79 20 6c 6f 63 61 74 65 | 64 20 69 6e 20 61 70 70 |y locate|d in app|
|00001b70| 6c 69 63 61 74 69 6f 6e | 73 2c 20 73 79 73 74 65 |lication|s, syste|
|00001b80| 6d 20 65 78 74 65 6e 73 | 69 6f 6e 20 66 69 6c 65 |m extens|ion file|
|00001b90| 73 2c 20 61 6e 64 20 74 | 68 65 20 66 69 72 6d 77 |s, and t|he firmw|
|00001ba0| 61 72 65 20 6f 66 20 65 | 78 70 61 6e 73 69 6f 6e |are of e|xpansion|
|00001bb0| 20 63 61 72 64 73 2e 20 | 41 20 64 72 69 76 65 72 | cards. |A driver|
|00001bc0| 20 72 65 73 6f 75 72 63 | 65 20 63 6f 6e 74 61 69 | resourc|e contai|
|00001bd0| 6e 73 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |ns infor|mation a|
|00001be0| 62 6f 75 74 20 74 68 65 | 20 64 72 69 76 65 72 2c |bout the| driver,|
|00001bf0| 20 69 6e 63 6c 75 64 69 | 6e 67 20 74 68 65 20 64 | includi|ng the d|
|00001c00| 72 69 76 65 72 20 6e 61 | 6d 65 2c 20 61 6e 64 20 |river na|me, and |
|00001c10| 74 68 65 20 63 6f 64 65 | 20 6e 65 63 65 73 73 61 |the code| necessa|
|00001c20| 72 79 20 66 6f 72 20 74 | 68 65 20 64 72 69 76 65 |ry for t|he drive|
|00001c30| 72 20 74 6f 20 70 65 72 | 66 6f 72 6d 20 69 74 73 |r to per|form its|
|00001c40| 20 66 75 6e 63 74 69 6f | 6e 73 2e 20 54 68 65 20 | functio|ns. The |
|00001c50| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 6d |Device M|anager m|
|00001c60| 75 73 74 20 6c 6f 61 64 | 20 61 20 64 72 69 76 65 |ust load| a drive|
|00001c70| 72 20 66 72 6f 6d 20 69 | 74 73 20 64 72 69 76 65 |r from i|ts drive|
|00001c80| 72 20 72 65 73 6f 75 72 | 63 65 20 69 6e 74 6f 20 |r resour|ce into |
|00001c90| 6d 65 6d 6f 72 79 20 62 | 65 66 6f 72 65 20 79 6f |memory b|efore yo|
|00001ca0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6f |ur appli|cation o|
|00001cb0| 72 20 61 6e 79 20 70 61 | 72 74 20 6f 66 20 74 68 |r any pa|rt of th|
|00001cc0| 65 20 73 79 73 74 65 6d | 20 63 61 6e 20 63 6f 6d |e system| can com|
|00001cd0| 6d 75 6e 69 63 61 74 65 | 20 77 69 74 68 20 69 74 |municate| with it|
|00001ce0| 2e 0d 54 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |..The De|vice Man|
|00001cf0| 61 67 65 72 20 6f 70 65 | 6e 73 20 63 65 72 74 61 |ager ope|ns certa|
|00001d00| 69 6e 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 |in devic|e driver|
|00001d10| 73 20 61 74 20 73 79 73 | 74 65 6d 20 73 74 61 72 |s at sys|tem star|
|00001d20| 74 75 70 20 74 69 6d 65 | 2e 20 54 68 65 73 65 20 |tup time|. These |
|00001d30| 64 72 69 76 65 72 73 20 | 6d 61 6b 65 20 75 70 20 |drivers |make up |
|00001d40| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 64 65 76 |the stan|dard dev|
|00001d50| 69 63 65 20 64 72 69 76 | 65 72 73 2c 20 77 68 69 |ice driv|ers, whi|
|00001d60| 63 68 20 69 6e 63 6c 75 | 64 65 20 74 68 65 20 44 |ch inclu|de the D|
|00001d70| 69 73 6b 20 44 72 69 76 | 65 72 2c 20 74 68 65 20 |isk Driv|er, the |
|00001d80| 53 65 72 69 61 6c 20 44 | 72 69 76 65 72 73 2c 20 |Serial D|rivers, |
|00001d90| 61 6e 64 20 70 72 69 6e | 74 65 72 20 64 72 69 76 |and prin|ter driv|
|00001da0| 65 72 73 2e 20 54 68 65 | 20 44 65 76 69 63 65 20 |ers. The| Device |
|00001db0| 4d 61 6e 61 67 65 72 20 | 6f 70 65 6e 73 20 6f 74 |Manager |opens ot|
|00001dc0| 68 65 72 20 64 72 69 76 | 65 72 73 20 77 68 65 6e |her driv|ers when|
|00001dd0| 20 72 65 71 75 65 73 74 | 65 64 d1 74 79 70 69 63 | request|ed.typic|
|00001de0| 61 6c 6c 79 20 62 79 20 | 69 6e 69 74 69 61 6c 69 |ally by |initiali|
|00001df0| 7a 61 74 69 6f 6e 20 28 | 27 49 4e 49 54 27 29 20 |zation (|'INIT') |
|00001e00| 72 65 73 6f 75 72 63 65 | 73 2c 20 61 70 70 6c 69 |resource|s, appli|
|00001e10| 63 61 74 69 6f 6e 73 2c | 20 61 6e 64 20 6f 74 68 |cations,| and oth|
|00001e20| 65 72 20 64 72 69 76 65 | 72 73 2e 0d 41 62 6f 75 |er drive|rs..Abou|
|00001e30| 74 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |t the De|vice Man|
|00001e40| 61 67 65 72 0d 54 68 65 | 20 44 65 76 69 63 65 20 |ager.The| Device |
|00001e50| 4d 61 6e 61 67 65 72 20 | 70 72 6f 76 69 64 65 73 |Manager |provides|
|00001e60| 20 74 68 72 65 65 20 62 | 61 73 69 63 20 73 65 72 | three b|asic ser|
|00001e70| 76 69 63 65 73 3a 0d 6e | 09 49 74 20 70 72 6f 76 |vices:.n|.It prov|
|00001e80| 69 64 65 73 20 61 20 63 | 6f 6d 6d 6f 6e 20 70 72 |ides a c|ommon pr|
|00001e90| 6f 67 72 61 6d 6d 69 6e | 67 20 69 6e 74 65 72 66 |ogrammin|g interf|
|00001ea0| 61 63 65 20 66 6f 72 20 | 61 70 70 6c 69 63 61 74 |ace for |applicat|
|00001eb0| 69 6f 6e 73 20 61 6e 64 | 20 6f 74 68 65 72 20 6d |ions and| other m|
|00001ec0| 61 6e 61 67 65 72 73 20 | 74 6f 20 75 73 65 20 77 |anagers |to use w|
|00001ed0| 68 65 6e 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6e |hen comm|unicatin|
|00001ee0| 67 20 77 69 74 68 20 64 | 65 76 69 63 65 20 64 72 |g with d|evice dr|
|00001ef0| 69 76 65 72 73 2e 0d 6e | 09 49 74 20 6d 61 69 6e |ivers..n|.It main|
|00001f00| 74 61 69 6e 73 20 64 61 | 74 61 20 73 74 72 75 63 |tains da|ta struc|
|00001f10| 74 75 72 65 73 20 74 6f | 20 6d 61 6e 61 67 65 20 |tures to| manage |
|00001f20| 6f 70 65 6e 20 64 65 76 | 69 63 65 20 64 72 69 76 |open dev|ice driv|
|00001f30| 65 72 73 2e 0d 6e 09 49 | 74 20 70 72 6f 76 69 64 |ers..n.I|t provid|
|00001f40| 65 73 20 73 75 70 70 6f | 72 74 20 72 6f 75 74 69 |es suppo|rt routi|
|00001f50| 6e 65 73 20 75 73 65 66 | 75 6c 20 77 68 65 6e 20 |nes usef|ul when |
|00001f60| 77 72 69 74 69 6e 67 20 | 79 6f 75 72 20 6f 77 6e |writing |your own|
|00001f70| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 73 2e | device |drivers.|
|00001f80| 0d 54 79 70 69 63 61 6c | 6c 79 2c 20 79 6f 75 72 |.Typical|ly, your|
|00001f90| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 77 6f 6e | applica|tion won|
|00001fa0| d5 74 20 63 6f 6d 6d 75 | 6e 69 63 61 74 65 20 64 |.t commu|nicate d|
|00001fb0| 69 72 65 63 74 6c 79 20 | 77 69 74 68 20 64 65 76 |irectly |with dev|
|00001fc0| 69 63 65 20 64 72 69 76 | 65 72 73 3b 20 69 6e 73 |ice driv|ers; ins|
|00001fd0| 74 65 61 64 2c 20 69 74 | 20 77 69 6c 6c 20 63 61 |tead, it| will ca|
|00001fe0| 6c 6c 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |ll Devic|e Manage|
|00001ff0| 72 20 72 6f 75 74 69 6e | 65 73 20 6f 72 20 63 61 |r routin|es or ca|
|00002000| 6c 6c 20 74 68 65 20 72 | 6f 75 74 69 6e 65 73 20 |ll the r|outines |
|00002010| 6f 66 20 61 6e 6f 74 68 | 65 72 20 6d 61 6e 61 67 |of anoth|er manag|
|00002020| 65 72 20 74 68 61 74 20 | 63 61 6c 6c 73 20 74 68 |er that |calls th|
|00002030| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00002040| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 79 |. For ex|ample, y|
|00002050| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00002060| 63 61 6e 20 63 6f 6d 6d | 75 6e 69 63 61 74 65 20 |can comm|unicate |
|00002070| 77 69 74 68 20 61 20 64 | 69 73 6b 20 64 72 69 76 |with a d|isk driv|
|00002080| 65 72 20 62 79 20 63 61 | 6c 6c 69 6e 67 20 74 68 |er by ca|lling th|
|00002090| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|000020a0| 20 64 69 72 65 63 74 6c | 79 20 6f 72 20 62 79 20 | directl|y or by |
|000020b0| 63 61 6c 6c 69 6e 67 20 | 74 68 65 20 46 69 6c 65 |calling |the File|
|000020c0| 20 4d 61 6e 61 67 65 72 | 2c 20 77 68 69 63 68 20 | Manager|, which |
|000020d0| 63 61 6c 6c 73 20 74 68 | 65 20 44 65 76 69 63 65 |calls th|e Device|
|000020e0| 20 4d 61 6e 61 67 65 72 | 2e 0d 46 69 67 75 72 65 | Manager|..Figure|
|000020f0| 20 31 2d 31 20 73 68 6f | 77 73 20 74 68 65 20 72 | 1-1 sho|ws the r|
|00002100| 65 6c 61 74 69 6f 6e 73 | 68 69 70 20 62 65 74 77 |elations|hip betw|
|00002110| 65 65 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |een appl|ications|
|00002120| 2c 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |, the De|vice Man|
|00002130| 61 67 65 72 2c 20 6f 74 | 68 65 72 20 6d 61 6e 61 |ager, ot|her mana|
|00002140| 67 65 72 73 2c 20 64 65 | 76 69 63 65 20 64 72 69 |gers, de|vice dri|
|00002150| 76 65 72 73 2c 20 61 6e | 64 20 64 65 76 69 63 65 |vers, an|d device|
|00002160| 73 2e 0d 43 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e |s..Commu|nication|
|00002170| 20 77 69 74 68 20 44 65 | 76 69 63 65 73 0d 42 65 | with De|vices.Be|
|00002180| 66 6f 72 65 20 74 68 65 | 20 44 65 76 69 63 65 20 |fore the| Device |
|00002190| 4d 61 6e 61 67 65 72 20 | 61 6c 6c 6f 77 73 20 61 |Manager |allows a|
|000021a0| 6e 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 6f 72 |n applic|ation or|
|000021b0| 20 61 6e 6f 74 68 65 72 | 20 6d 61 6e 61 67 65 72 | another| manager|
|000021c0| 20 74 6f 20 63 6f 6d 6d | 75 6e 69 63 61 74 65 20 | to comm|unicate |
|000021d0| 77 69 74 68 20 61 20 64 | 65 76 69 63 65 20 64 72 |with a d|evice dr|
|000021e0| 69 76 65 72 2c 20 74 68 | 65 20 64 72 69 76 65 72 |iver, th|e driver|
|000021f0| 20 6d 75 73 74 20 62 65 | 20 6f 70 65 6e 2c 20 77 | must be| open, w|
|00002200| 68 69 63 68 20 6d 65 61 | 6e 73 20 74 68 65 20 44 |hich mea|ns the D|
|00002210| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 68 61 |evice Ma|nager ha|
|00002220| 73 20 72 65 63 65 69 76 | 65 64 20 61 20 72 65 71 |s receiv|ed a req|
|00002230| 75 65 73 74 20 74 6f 20 | 6f 70 65 6e 20 74 68 65 |uest to |open the|
|00002240| 20 64 72 69 76 65 72 2c | 20 68 61 73 20 6c 6f 61 | driver,| has loa|
|00002250| 64 65 64 20 74 68 65 20 | 64 72 69 76 65 72 20 69 |ded the |driver i|
|00002260| 6e 74 6f 20 6d 65 6d 6f | 72 79 20 69 66 20 6e 65 |nto memo|ry if ne|
|00002270| 63 65 73 73 61 72 79 2c | 20 61 6e 64 20 68 61 73 |cessary,| and has|
|00002280| 20 73 75 63 63 65 73 73 | 66 75 6c 6c 79 20 63 61 | success|fully ca|
|00002290| 6c 6c 65 64 20 74 68 65 | 20 64 72 69 76 65 72 d5 |lled the| driver.|
|000022a0| 73 20 6f 70 65 6e 69 6e | 67 20 72 6f 75 74 69 6e |s openin|g routin|
|000022b0| 65 2e 0d 57 68 65 6e 20 | 6f 70 65 6e 69 6e 67 20 |e..When |opening |
|000022c0| 61 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 2c |a device| driver,|
|000022d0| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|000022e0| 67 65 72 20 63 72 65 61 | 74 65 73 20 61 20 64 65 |ger crea|tes a de|
|000022f0| 76 69 63 65 20 63 6f 6e | 74 72 6f 6c 20 65 6e 74 |vice con|trol ent|
|00002300| 72 79 20 28 44 43 45 29 | 2c 20 77 68 69 63 68 20 |ry (DCE)|, which |
|00002310| 63 6f 6e 74 61 69 6e 73 | 20 69 6e 66 6f 72 6d 61 |contains| informa|
|00002320| 74 69 6f 6e 20 61 62 6f | 75 74 20 74 68 65 20 64 |tion abo|ut the d|
|00002330| 65 76 69 63 65 20 64 72 | 69 76 65 72 2e 20 46 6f |evice dr|iver. Fo|
|00002340| 72 20 65 78 61 6d 70 6c | 65 2c 20 74 68 65 20 64 |r exampl|e, the d|
|00002350| 65 76 69 63 65 20 63 6f | 6e 74 72 6f 6c 20 65 6e |evice co|ntrol en|
|00002360| 74 72 79 20 63 6f 6e 74 | 61 69 6e 73 20 61 20 68 |try cont|ains a h|
|00002370| 61 6e 64 6c 65 20 74 6f | 20 74 68 65 20 64 65 76 |andle to| the dev|
|00002380| 69 63 65 20 64 72 69 76 | 65 72 20 63 6f 64 65 20 |ice driv|er code |
|00002390| 28 6f 72 20 61 20 70 6f | 69 6e 74 65 72 20 66 6f |(or a po|inter fo|
|000023a0| 72 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 73 |r device| drivers|
|000023b0| 20 69 6e 20 52 4f 4d 29 | 2e 20 54 79 70 69 63 61 | in ROM)|. Typica|
|000023c0| 6c 6c 79 2c 20 74 68 65 | 20 44 65 76 69 63 65 20 |lly, the| Device |
|000023d0| 4d 61 6e 61 67 65 72 20 | 6d 61 69 6e 74 61 69 6e |Manager |maintain|
|000023e0| 73 20 6f 6e 65 20 64 65 | 76 69 63 65 20 63 6f 6e |s one de|vice con|
|000023f0| 74 72 6f 6c 20 65 6e 74 | 72 79 20 66 6f 72 20 65 |trol ent|ry for e|
|00002400| 61 63 68 20 6f 70 65 6e | 20 64 65 76 69 63 65 20 |ach open| device |
|00002410| 64 72 69 76 65 72 2c 20 | 62 75 74 20 69 74 20 69 |driver, |but it i|
|00002420| 73 20 70 6f 73 73 69 62 | 6c 65 20 66 6f 72 20 6d |s possib|le for m|
|00002430| 75 6c 74 69 70 6c 65 20 | 65 6e 74 72 69 65 73 20 |ultiple |entries |
|00002440| 74 6f 20 72 65 66 65 72 | 20 74 6f 20 74 68 65 20 |to refer| to the |
|00002450| 73 61 6d 65 20 64 72 69 | 76 65 72 2e 0d 54 68 65 |same dri|ver..The|
|00002460| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00002470| 6d 61 69 6e 74 61 69 6e | 73 20 61 6e 6f 74 68 65 |maintain|s anothe|
|00002480| 72 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |r data s|tructure|
|00002490| 2c 20 74 68 65 20 75 6e | 69 74 20 74 61 62 6c 65 |, the un|it table|
|000024a0| 2c 20 74 6f 20 6f 72 67 | 61 6e 69 7a 65 20 74 68 |, to org|anize th|
|000024b0| 65 20 64 65 76 69 63 65 | 20 63 6f 6e 74 72 6f 6c |e device| control|
|000024c0| 20 65 6e 74 72 69 65 73 | 2e 20 54 68 65 20 75 6e | entries|. The un|
|000024d0| 69 74 20 74 61 62 6c 65 | 20 63 6f 6e 74 61 69 6e |it table| contain|
|000024e0| 73 20 61 20 68 61 6e 64 | 6c 65 20 74 6f 20 74 68 |s a hand|le to th|
|000024f0| 65 20 64 65 76 69 63 65 | 20 63 6f 6e 74 72 6f 6c |e device| control|
|00002500| 20 65 6e 74 72 79 20 66 | 6f 72 20 65 61 63 68 20 | entry f|or each |
|00002510| 6f 70 65 6e 20 64 72 69 | 76 65 72 2e 20 54 68 65 |open dri|ver. The|
|00002520| 20 6c 6f 63 61 74 69 6f | 6e 20 6f 66 20 61 20 64 | locatio|n of a d|
|00002530| 72 69 76 65 72 d5 73 20 | 64 65 76 69 63 65 20 63 |river.s |device c|
|00002540| 6f 6e 74 72 6f 6c 20 65 | 6e 74 72 79 20 69 6e 20 |ontrol e|ntry in |
|00002550| 74 68 65 20 75 6e 69 74 | 20 74 61 62 6c 65 20 69 |the unit| table i|
|00002560| 73 20 63 61 6c 6c 65 64 | 20 74 68 65 20 64 72 69 |s called| the dri|
|00002570| 76 65 72 d5 73 20 75 6e | 69 74 20 6e 75 6d 62 65 |ver.s un|it numbe|
|00002580| 72 2e 20 0d 57 68 65 6e | 20 79 6f 75 20 6f 70 65 |r. .When| you ope|
|00002590| 6e 20 61 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |n a devi|ce drive|
|000025a0| 72 2c 20 74 68 65 20 44 | 65 76 69 63 65 20 4d 61 |r, the D|evice Ma|
|000025b0| 6e 61 67 65 72 20 72 65 | 74 75 72 6e 73 20 61 20 |nager re|turns a |
|000025c0| 64 72 69 76 65 72 20 72 | 65 66 65 72 65 6e 63 65 |driver r|eference|
|000025d0| 20 6e 75 6d 62 65 72 20 | 66 6f 72 20 74 68 65 20 | number |for the |
|000025e0| 64 72 69 76 65 72 2e 20 | 59 6f 75 20 75 73 65 20 |driver. |You use |
|000025f0| 74 68 65 20 64 72 69 76 | 65 72 20 72 65 66 65 72 |the driv|er refer|
|00002600| 65 6e 63 65 20 6e 75 6d | 62 65 72 2c 20 69 6e 73 |ence num|ber, ins|
|00002610| 74 65 61 64 20 6f 66 20 | 74 68 65 20 64 72 69 76 |tead of |the driv|
|00002620| 65 72 20 6e 61 6d 65 2c | 20 74 6f 20 69 64 65 6e |er name,| to iden|
|00002630| 74 69 66 79 20 74 68 65 | 20 64 72 69 76 65 72 20 |tify the| driver |
|00002640| 69 6e 20 73 75 62 73 65 | 71 75 65 6e 74 20 63 6f |in subse|quent co|
|00002650| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 72 65 71 75 |mmunicat|ion requ|
|00002660| 65 73 74 73 2e 20 54 68 | 65 20 64 72 69 76 65 72 |ests. Th|e driver|
|00002670| 20 72 65 66 65 72 65 6e | 63 65 20 6e 75 6d 62 65 | referen|ce numbe|
|00002680| 72 20 69 73 20 72 65 6c | 61 74 65 64 20 74 6f 20 |r is rel|ated to |
|00002690| 74 68 65 20 75 6e 69 74 | 20 6e 75 6d 62 65 72 20 |the unit| number |
|000026a0| 62 79 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |by the f|ollowing|
|000026b0| 20 66 6f 72 6d 75 6c 61 | 3a 0d 54 68 65 20 44 65 | formula|:.The De|
|000026c0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 61 6c 73 |vice Man|ager als|
|000026d0| 6f 20 6d 61 69 6e 74 61 | 69 6e 73 20 61 20 64 72 |o mainta|ins a dr|
|000026e0| 69 76 65 72 20 72 65 71 | 75 65 73 74 20 71 75 65 |iver req|uest que|
|000026f0| 75 65 20 66 6f 72 20 65 | 61 63 68 20 6f 70 65 6e |ue for e|ach open|
|00002700| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 2e 20 | device |driver. |
|00002710| 41 74 20 74 68 65 20 68 | 65 61 64 20 6f 66 20 74 |At the h|ead of t|
|00002720| 68 69 73 20 71 75 65 75 | 65 20 69 73 20 74 68 65 |his queu|e is the|
|00002730| 20 49 2f 4f 20 72 65 71 | 75 65 73 74 20 63 75 72 | I/O req|uest cur|
|00002740| 72 65 6e 74 6c 79 20 62 | 65 69 6e 67 20 70 72 6f |rently b|eing pro|
|00002750| 63 65 73 73 65 64 20 62 | 79 20 74 68 65 20 64 65 |cessed b|y the de|
|00002760| 76 69 63 65 20 64 72 69 | 76 65 72 2e 20 54 68 65 |vice dri|ver. The|
|00002770| 20 72 65 73 74 20 6f 66 | 20 74 68 65 20 71 75 65 | rest of| the que|
|00002780| 75 65 20 63 6f 6e 74 61 | 69 6e 73 20 70 65 6e 64 |ue conta|ins pend|
|00002790| 69 6e 67 20 49 2f 4f 20 | 72 65 71 75 65 73 74 73 |ing I/O |requests|
|000027a0| d1 72 65 71 75 65 73 74 | 73 20 74 68 65 20 44 65 |.request|s the De|
|000027b0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 68 61 73 |vice Man|ager has|
|000027c0| 20 72 65 63 65 69 76 65 | 64 20 62 75 74 20 6e 6f | receive|d but no|
|000027d0| 74 20 79 65 74 20 73 65 | 6e 74 20 74 6f 20 74 68 |t yet se|nt to th|
|000027e0| 65 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 2e |e device| driver.|
|000027f0| 20 54 68 69 73 20 71 75 | 65 75 65 20 61 6c 6c 6f | This qu|eue allo|
|00002800| 77 73 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |ws your |applicat|
|00002810| 69 6f 6e 20 74 6f 20 72 | 65 71 75 65 73 74 20 61 |ion to r|equest a|
|00002820| 20 64 61 74 61 20 74 72 | 61 6e 73 66 65 72 20 77 | data tr|ansfer w|
|00002830| 69 74 68 20 61 20 62 75 | 73 79 20 64 65 76 69 63 |ith a bu|sy devic|
|00002840| 65 20 61 6e 64 20 61 63 | 63 6f 6d 70 6c 69 73 68 |e and ac|complish|
|00002850| 20 6f 74 68 65 72 20 74 | 61 73 6b 73 20 77 68 69 | other t|asks whi|
|00002860| 6c 65 20 74 68 65 20 64 | 65 76 69 63 65 20 73 61 |le the d|evice sa|
|00002870| 74 69 73 66 69 65 73 20 | 70 72 65 76 69 6f 75 73 |tisfies |previous|
|00002880| 20 72 65 71 75 65 73 74 | 73 2e 0d 57 69 74 68 20 | request|s..With |
|00002890| 72 65 73 70 65 63 74 20 | 74 6f 20 74 68 65 20 64 |respect |to the d|
|000028a0| 72 69 76 65 72 20 72 65 | 71 75 65 73 74 20 71 75 |river re|quest qu|
|000028b0| 65 75 65 2c 20 74 68 65 | 20 44 65 76 69 63 65 20 |eue, the| Device |
|000028c0| 4d 61 6e 61 67 65 72 20 | 61 6c 6c 6f 77 73 20 79 |Manager |allows y|
|000028d0| 6f 75 20 6d 61 6b 65 20 | 74 6f 20 74 68 72 65 65 |ou make |to three|
|000028e0| 20 74 79 70 65 73 20 6f | 66 20 72 65 71 75 65 73 | types o|f reques|
|000028f0| 74 73 3a 20 73 79 6e 63 | 68 72 6f 6e 6f 75 73 2c |ts: sync|hronous,|
|00002900| 20 61 73 79 6e 63 68 72 | 6f 6e 6f 75 73 2c 20 61 | asynchr|onous, a|
|00002910| 6e 64 20 69 6d 6d 65 64 | 69 61 74 65 2e 0d 54 68 |nd immed|iate..Th|
|00002920| 65 20 74 65 72 6d 73 20 | 73 79 6e 63 68 72 6f 6e |e terms |synchron|
|00002930| 6f 75 73 20 61 6e 64 20 | 61 73 79 6e 63 68 72 6f |ous and |asynchro|
|00002940| 6e 6f 75 73 20 68 61 76 | 65 20 64 69 66 66 65 72 |nous hav|e differ|
|00002950| 65 6e 74 20 6d 65 61 6e | 69 6e 67 73 20 64 65 70 |ent mean|ings dep|
|00002960| 65 6e 64 69 6e 67 20 6f | 6e 20 74 68 65 69 72 20 |ending o|n their |
|00002970| 63 6f 6e 74 65 78 74 2e | 20 0d 57 68 65 6e 20 72 |context.| .When r|
|00002980| 65 66 65 72 72 69 6e 67 | 20 74 6f 20 61 20 64 65 |eferring| to a de|
|00002990| 76 69 63 65 20 64 72 69 | 76 65 72 2c 20 74 68 65 |vice dri|ver, the|
|000029a0| 20 74 65 72 6d 20 73 79 | 6e 63 68 72 6f 6e 6f 75 | term sy|nchronou|
|000029b0| 73 20 69 6e 64 69 63 61 | 74 65 73 20 74 68 61 74 |s indica|tes that|
|000029c0| 20 74 68 65 20 64 72 69 | 76 65 72 20 63 6f 6d 70 | the dri|ver comp|
|000029d0| 6c 65 74 65 73 20 74 68 | 65 20 65 6e 74 69 72 65 |letes th|e entire|
|000029e0| 20 72 65 71 75 65 73 74 | 20 62 65 66 6f 72 65 20 | request| before |
|000029f0| 72 65 74 75 72 6e 69 6e | 67 20 63 6f 6e 74 72 6f |returnin|g contro|
|00002a00| 6c 20 74 6f 20 74 68 65 | 20 44 65 76 69 63 65 20 |l to the| Device |
|00002a10| 4d 61 6e 61 67 65 72 2e | 20 54 68 65 20 74 65 72 |Manager.| The ter|
|00002a20| 6d 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 69 |m asynch|ronous i|
|00002a30| 6e 64 69 63 61 74 65 73 | 20 74 68 61 74 20 74 68 |ndicates| that th|
|00002a40| 65 20 64 72 69 76 65 72 | 20 63 61 6e 20 62 65 67 |e driver| can beg|
|00002a50| 69 6e 20 70 72 6f 63 65 | 73 73 69 6e 67 20 61 20 |in proce|ssing a |
|00002a60| 72 65 71 75 65 73 74 20 | 61 6e 64 20 72 65 74 75 |request |and retu|
|00002a70| 72 6e 20 63 6f 6e 74 72 | 6f 6c 20 74 6f 20 74 68 |rn contr|ol to th|
|00002a80| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00002a90| 20 62 65 66 6f 72 65 20 | 74 68 65 20 72 65 71 75 | before |the requ|
|00002aa0| 65 73 74 20 69 73 20 63 | 6f 6d 70 6c 65 74 65 2e |est is c|omplete.|
|00002ab0| 20 57 68 65 6e 20 61 20 | 64 72 69 76 65 72 20 69 | When a |driver i|
|00002ac0| 73 20 68 61 6e 64 6c 69 | 6e 67 20 61 20 72 65 71 |s handli|ng a req|
|00002ad0| 75 65 73 74 20 61 73 79 | 6e 63 68 72 6f 6e 6f 75 |uest asy|nchronou|
|00002ae0| 73 6c 79 2c 20 69 74 20 | 75 73 75 61 6c 6c 79 20 |sly, it |usually |
|00002af0| 72 65 6c 69 65 73 20 6f | 6e 20 69 6e 74 65 72 72 |relies o|n interr|
|00002b00| 75 70 74 73 20 66 72 6f | 6d 20 74 68 65 20 68 61 |upts fro|m the ha|
|00002b10| 72 64 77 61 72 65 20 64 | 65 76 69 63 65 20 74 6f |rdware d|evice to|
|00002b20| 20 63 6f 6e 74 69 6e 75 | 65 20 70 72 6f 63 65 73 | continu|e proces|
|00002b30| 73 69 6e 67 20 74 68 65 | 20 72 65 71 75 65 73 74 |sing the| request|
|00002b40| 2e 0d 57 68 65 6e 20 72 | 65 66 65 72 72 69 6e 67 |..When r|eferring|
|00002b50| 20 74 6f 20 72 65 71 75 | 65 73 74 73 2c 20 74 68 | to requ|ests, th|
|00002b60| 65 20 74 65 72 6d 73 20 | 73 79 6e 63 68 72 6f 6e |e terms |synchron|
|00002b70| 6f 75 73 20 61 6e 64 20 | 61 73 79 6e 63 68 72 6f |ous and |asynchro|
|00002b80| 6e 6f 75 73 20 69 6e 64 | 69 63 61 74 65 20 68 6f |nous ind|icate ho|
|00002b90| 77 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |w the De|vice Man|
|00002ba0| 61 67 65 72 20 70 72 6f | 63 65 73 73 65 73 20 74 |ager pro|cesses t|
|00002bb0| 68 65 20 72 65 71 75 65 | 73 74 2e 20 41 63 74 75 |he reque|st. Actu|
|00002bc0| 61 6c 6c 79 2c 20 79 6f | 75 20 63 61 6e 20 73 70 |ally, yo|u can sp|
|00002bd0| 65 63 69 66 79 20 74 68 | 61 74 20 74 68 65 20 44 |ecify th|at the D|
|00002be0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 70 72 |evice Ma|nager pr|
|00002bf0| 6f 63 65 73 73 20 74 68 | 65 20 72 65 71 75 65 73 |ocess th|e reques|
|00002c00| 74 20 69 6e 20 6f 6e 65 | 20 6f 66 20 74 68 72 65 |t in one| of thre|
|00002c10| 65 20 77 61 79 73 2e 0d | 6e 09 53 79 6e 63 68 72 |e ways..|n.Synchr|
|00002c20| 6f 6e 6f 75 73 20 72 65 | 71 75 65 73 74 73 2e 20 |onous re|quests. |
|00002c30| 57 68 65 6e 20 79 6f 75 | 20 6d 61 6b 65 20 61 20 |When you| make a |
|00002c40| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 72 65 71 75 |synchron|ous requ|
|00002c50| 65 73 74 2c 20 74 68 65 | 20 44 65 76 69 63 65 20 |est, the| Device |
|00002c60| 4d 61 6e 61 67 65 72 20 | 70 6c 61 63 65 73 20 79 |Manager |places y|
|00002c70| 6f 75 72 20 72 65 71 75 | 65 73 74 20 61 74 20 74 |our requ|est at t|
|00002c80| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 64 72 |he end o|f the dr|
|00002c90| 69 76 65 72 20 72 65 71 | 75 65 73 74 20 71 75 65 |iver req|uest que|
|00002ca0| 75 65 2e 20 54 68 65 20 | 44 65 76 69 63 65 20 4d |ue. The |Device M|
|00002cb0| 61 6e 61 67 65 72 20 74 | 68 65 6e 20 77 61 69 74 |anager t|hen wait|
|00002cc0| 73 20 75 6e 74 69 6c 20 | 74 68 65 20 64 72 69 76 |s until |the driv|
|00002cd0| 65 72 20 68 61 73 20 68 | 61 6e 64 6c 65 64 20 65 |er has h|andled e|
|00002ce0| 76 65 72 79 20 72 65 71 | 75 65 73 74 20 69 6e 20 |very req|uest in |
|00002cf0| 74 68 65 20 71 75 65 75 | 65 2c 20 69 6e 63 6c 75 |the queu|e, inclu|
|00002d00| 64 69 6e 67 20 74 68 65 | 20 73 79 6e 63 68 72 6f |ding the| synchro|
|00002d10| 6e 6f 75 73 20 6f 6e 65 | 2c 20 62 65 66 6f 72 65 |nous one|, before|
|00002d20| 20 72 65 74 75 72 6e 69 | 6e 67 20 63 6f 6e 74 72 | returni|ng contr|
|00002d30| 6f 6c 20 74 6f 20 79 6f | 75 72 20 61 70 70 6c 69 |ol to yo|ur appli|
|00002d40| 63 61 74 69 6f 6e 2e 20 | 4e 6f 74 69 63 65 20 74 |cation. |Notice t|
|00002d50| 68 65 72 65 20 63 61 6e | 20 6e 65 76 65 72 20 62 |here can| never b|
|00002d60| 65 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |e more t|han one |
|00002d70| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 72 65 71 75 |synchron|ous requ|
|00002d80| 65 73 74 20 70 65 72 20 | 64 72 69 76 65 72 20 72 |est per |driver r|
|00002d90| 65 71 75 65 73 74 20 71 | 75 65 75 65 20 61 74 20 |equest q|ueue at |
|00002da0| 61 6e 79 20 67 69 76 65 | 6e 20 74 69 6d 65 2e 20 |any give|n time. |
|00002db0| 28 54 68 65 20 64 72 69 | 76 65 72 20 63 61 6e 20 |(The dri|ver can |
|00002dc0| 68 61 6e 64 6c 65 20 65 | 61 63 68 20 72 65 71 75 |handle e|ach requ|
|00002dd0| 65 73 74 20 69 6e 20 74 | 68 65 20 71 75 65 75 65 |est in t|he queue|
|00002de0| 20 73 79 6e 63 68 72 6f | 6e 6f 75 73 6c 79 20 6f | synchro|nously o|
|00002df0| 72 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 6c 79 |r asynch|ronously|
|00002e00| 2c 20 62 75 74 20 74 68 | 65 20 44 65 76 69 63 65 |, but th|e Device|
|00002e10| 20 4d 61 6e 61 67 65 72 | 20 64 6f 65 73 20 6e 6f | Manager| does no|
|00002e20| 74 20 72 65 74 75 72 6e | 20 63 6f 6e 74 72 6f 6c |t return| control|
|00002e30| 20 74 6f 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 | to your| applica|
|00002e40| 74 69 6f 6e 20 75 6e 74 | 69 6c 20 74 68 65 20 66 |tion unt|il the f|
|00002e50| 69 6e 61 6c 20 72 65 71 | 75 65 73 74 20 69 73 20 |inal req|uest is |
|00002e60| 63 6f 6d 70 6c 65 74 65 | 2e 29 0d 6e 09 41 73 79 |complete|.).n.Asy|
|00002e70| 6e 63 68 72 6f 6e 6f 75 | 73 20 72 65 71 75 65 73 |nchronou|s reques|
|00002e80| 74 73 2e 20 57 68 65 6e | 20 79 6f 75 20 6d 61 6b |ts. When| you mak|
|00002e90| 65 20 61 6e 20 61 73 79 | 6e 63 68 72 6f 6e 6f 75 |e an asy|nchronou|
|00002ea0| 73 20 72 65 71 75 65 73 | 74 2c 20 74 68 65 20 44 |s reques|t, the D|
|00002eb0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 70 6c |evice Ma|nager pl|
|00002ec0| 61 63 65 73 20 79 6f 75 | 72 20 72 65 71 75 65 73 |aces you|r reques|
|00002ed0| 74 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |t at the| end of |
|00002ee0| 74 68 65 20 64 72 69 76 | 65 72 20 72 65 71 75 65 |the driv|er reque|
|00002ef0| 73 74 20 71 75 65 75 65 | 2c 20 62 75 74 20 69 74 |st queue|, but it|
|00002f00| 20 72 65 74 75 72 6e 73 | 20 63 6f 6e 74 72 6f 6c | returns| control|
|00002f10| 20 74 6f 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 | to your| applica|
|00002f20| 74 69 6f 6e 20 69 6d 6d | 65 64 69 61 74 65 6c 79 |tion imm|ediately|
|00002f30| d1 70 6f 74 65 6e 74 69 | 61 6c 6c 79 20 62 65 66 |.potenti|ally bef|
|00002f40| 6f 72 65 20 74 68 65 20 | 72 65 71 75 65 73 74 20 |ore the |request |
|00002f50| 69 73 20 73 61 74 69 73 | 66 69 65 64 2e 20 59 6f |is satis|fied. Yo|
|00002f60| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |ur appli|cation i|
|00002f70| 73 20 66 72 65 65 20 74 | 6f 20 70 65 72 66 6f 72 |s free t|o perfor|
|00002f80| 6d 20 6f 74 68 65 72 20 | 74 61 73 6b 73 20 77 68 |m other |tasks wh|
|00002f90| 69 6c 65 20 74 68 65 20 | 64 72 69 76 65 72 20 73 |ile the |driver s|
|00002fa0| 61 74 69 73 66 69 65 73 | 20 74 68 65 20 72 65 71 |atisfies| the req|
|00002fb0| 75 65 73 74 73 20 69 6e | 20 69 74 73 20 71 75 65 |uests in| its que|
|00002fc0| 75 65 2e 20 54 68 65 20 | 44 65 76 69 63 65 20 4d |ue. The |Device M|
|00002fd0| 61 6e 61 67 65 72 20 70 | 72 6f 76 69 64 65 73 20 |anager p|rovides |
|00002fe0| 6d 65 63 68 61 6e 69 73 | 6d 73 20 66 6f 72 20 79 |mechanis|ms for y|
|00002ff0| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|00003000| 74 6f 20 64 65 74 65 72 | 6d 69 6e 65 20 77 68 65 |to deter|mine whe|
|00003010| 6e 20 74 68 65 20 64 72 | 69 76 65 72 20 68 61 73 |n the dr|iver has|
|00003020| 20 73 61 74 69 73 66 69 | 65 64 20 74 68 65 20 72 | satisfi|ed the r|
|00003030| 65 71 75 65 73 74 2e 20 | 0d 6e 09 49 6d 6d 65 64 |equest. |.n.Immed|
|00003040| 69 61 74 65 20 72 65 71 | 75 65 73 74 73 2e 20 57 |iate req|uests. W|
|00003050| 68 65 6e 20 79 6f 75 20 | 63 61 6c 6c 20 61 20 44 |hen you |call a D|
|00003060| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 72 6f |evice Ma|nager ro|
|00003070| 75 74 69 6e 65 20 69 6d | 6d 65 64 69 61 74 65 6c |utine im|mediatel|
|00003080| 79 2c 20 74 68 65 20 44 | 65 76 69 63 65 20 4d 61 |y, the D|evice Ma|
|00003090| 6e 61 67 65 72 20 73 65 | 6e 64 73 20 79 6f 75 72 |nager se|nds your|
|000030a0| 20 72 65 71 75 65 73 74 | 20 64 69 72 65 63 74 6c | request| directl|
|000030b0| 79 20 74 6f 20 74 68 65 | 20 64 72 69 76 65 72 2c |y to the| driver,|
|000030c0| 20 62 79 70 61 73 73 69 | 6e 67 20 74 68 65 20 64 | bypassi|ng the d|
|000030d0| 72 69 76 65 72 20 72 65 | 71 75 65 73 74 20 71 75 |river re|quest qu|
|000030e0| 65 75 65 2c 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |eue, and| returns|
|000030f0| 20 63 6f 6e 74 72 6f 6c | 20 74 6f 20 79 6f 75 72 | control| to your|
|00003100| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 77 68 65 | applica|tion whe|
|00003110| 6e 20 74 68 65 20 72 65 | 71 75 65 73 74 20 69 73 |n the re|quest is|
|00003120| 20 63 6f 6d 70 6c 65 74 | 65 2e 20 41 6e 20 61 73 | complet|e. An as|
|00003130| 79 6e 63 68 72 6f 6e 6f | 75 73 20 64 65 76 69 63 |ynchrono|us devic|
|00003140| 65 20 64 72 69 76 65 72 | 2c 20 77 68 69 63 68 20 |e driver|, which |
|00003150| 63 61 6e 20 70 72 6f 63 | 65 73 73 20 61 20 73 69 |can proc|ess a si|
|00003160| 6e 67 6c 65 20 63 6f 6d | 6d 75 6e 69 63 61 74 69 |ngle com|municati|
|00003170| 6f 6e 20 72 65 71 75 65 | 73 74 20 69 6e 20 61 20 |on reque|st in a |
|00003180| 6e 75 6d 62 65 72 20 6f | 66 20 73 74 65 70 73 2c |number o|f steps,|
|00003190| 20 6d 69 67 68 74 20 62 | 65 20 69 6e 20 74 68 65 | might b|e in the|
|000031a0| 20 6d 69 64 64 6c 65 20 | 6f 66 20 70 72 6f 63 65 | middle |of proce|
|000031b0| 73 73 69 6e 67 20 61 6e | 6f 74 68 65 72 20 72 65 |ssing an|other re|
|000031c0| 71 75 65 73 74 2e 20 41 | 20 73 69 6d 69 6c 61 72 |quest. A| similar|
|000031d0| 20 73 69 74 75 61 74 69 | 6f 6e 20 63 61 6e 20 65 | situati|on can e|
|000031e0| 78 69 73 74 20 65 76 65 | 6e 20 66 6f 72 20 61 20 |xist eve|n for a |
|000031f0| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 64 65 76 69 |synchron|ous devi|
|00003200| 63 65 20 64 72 69 76 65 | 72 20 69 66 20 79 6f 75 |ce drive|r if you|
|00003210| 20 6d 61 6b 65 20 74 68 | 65 20 69 6d 6d 65 64 69 | make th|e immedi|
|00003220| 61 74 65 20 72 65 71 75 | 65 73 74 20 64 75 72 69 |ate requ|est duri|
|00003230| 6e 67 20 69 6e 74 65 72 | 72 75 70 74 20 74 69 6d |ng inter|rupt tim|
|00003240| 65 2e 20 44 65 76 69 63 | 65 20 64 72 69 76 65 72 |e. Devic|e driver|
|00003250| 73 20 74 68 61 74 20 63 | 61 6e 20 68 61 6e 64 6c |s that c|an handl|
|00003260| 65 20 74 68 69 73 20 73 | 69 74 75 61 74 69 6f 6e |e this s|ituation|
|00003270| 20 63 6f 72 72 65 63 74 | 6c 79 20 61 72 65 20 63 | correct|ly are c|
|00003280| 61 6c 6c 65 64 20 72 65 | 65 6e 74 72 61 6e 74 20 |alled re|entrant |
|00003290| 64 72 69 76 65 72 73 2e | 20 41 73 20 73 6f 6d 65 |drivers.| As some|
|000032a0| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 73 20 | device |drivers |
|000032b0| 61 72 65 20 6e 6f 74 20 | 72 65 65 6e 74 72 61 6e |are not |reentran|
|000032c0| 74 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 61 6c |t, you s|hould al|
|000032d0| 77 61 79 73 20 63 68 65 | 63 6b 20 61 20 64 72 69 |ways che|ck a dri|
|000032e0| 76 65 72 d5 73 20 64 6f | 63 75 6d 65 6e 74 61 74 |ver.s do|cumentat|
|000032f0| 69 6f 6e 20 62 65 66 6f | 72 65 20 6d 61 6b 69 6e |ion befo|re makin|
|00003300| 67 20 69 6d 6d 65 64 69 | 61 74 65 20 72 65 71 75 |g immedi|ate requ|
|00003310| 65 73 74 73 2e 0d 54 68 | 65 20 6e 65 78 74 20 73 |ests..Th|e next s|
|00003320| 65 63 74 69 6f 6e 2c 20 | d2 55 73 69 6e 67 20 74 |ection, |.Using t|
|00003330| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|00003340| 72 2c d3 20 64 65 73 63 | 72 69 62 65 73 20 68 6f |r,. desc|ribes ho|
|00003350| 77 20 74 6f 20 73 70 65 | 63 69 66 79 20 74 68 65 |w to spe|cify the|
|00003360| 20 6d 61 6e 6e 65 72 20 | 69 6e 20 77 68 69 63 68 | manner |in which|
|00003370| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00003380| 67 65 72 20 73 68 6f 75 | 6c 64 20 70 72 6f 63 65 |ger shou|ld proce|
|00003390| 73 73 20 79 6f 75 72 20 | 72 65 71 75 65 73 74 2e |ss your |request.|
|000033a0| 0d 54 68 65 20 63 68 61 | 70 74 65 72 20 d2 57 72 |.The cha|pter .Wr|
|000033b0| 69 74 69 6e 67 20 59 6f | 75 72 20 4f 77 6e 20 44 |iting Yo|ur Own D|
|000033c0| 65 76 69 63 65 20 44 72 | 69 76 65 72 d3 20 69 6e |evice Dr|iver. in|
|000033d0| 20 74 68 69 73 20 62 6f | 6f 6b 20 67 69 76 65 73 | this bo|ok gives|
|000033e0| 20 6d 6f 72 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | more in|formatio|
|000033f0| 6e 20 61 62 6f 75 74 20 | 74 68 65 20 44 65 76 69 |n about |the Devi|
|00003400| 63 65 20 4d 61 6e 61 67 | 65 72 20 64 61 74 61 20 |ce Manag|er data |
|00003410| 73 74 72 75 63 74 75 72 | 65 73 20 61 6e 64 20 61 |structur|es and a|
|00003420| 6c 73 6f 20 64 65 73 63 | 72 69 62 65 73 20 74 68 |lso desc|ribes th|
|00003430| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00003440| 20 72 6f 75 74 69 6e 65 | 73 20 75 73 65 66 75 6c | routine|s useful|
|00003450| 20 66 6f 72 20 77 72 69 | 74 69 6e 67 20 64 65 76 | for wri|ting dev|
|00003460| 69 63 65 20 64 72 69 76 | 65 72 73 2e 0d 55 73 69 |ice driv|ers..Usi|
|00003470| 6e 67 20 74 68 65 20 44 | 65 76 69 63 65 20 4d 61 |ng the D|evice Ma|
|00003480| 6e 61 67 65 72 0d 59 6f | 75 72 20 61 70 70 6c 69 |nager.Yo|ur appli|
|00003490| 63 61 74 69 6f 6e 20 63 | 61 6e 20 75 73 65 20 44 |cation c|an use D|
|000034a0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 72 6f |evice Ma|nager ro|
|000034b0| 75 74 69 6e 65 73 20 74 | 6f 20 63 6f 6d 6d 75 6e |utines t|o commun|
|000034c0| 69 63 61 74 65 20 77 69 | 74 68 20 64 65 76 69 63 |icate wi|th devic|
|000034d0| 65 73 2e 20 49 74 20 63 | 61 6e 20 75 73 65 20 74 |es. It c|an use t|
|000034e0| 68 65 73 65 20 72 6f 75 | 74 69 6e 65 73 20 74 6f |hese rou|tines to|
|000034f0| 20 6f 70 65 6e 20 61 6e | 64 20 63 6c 6f 73 65 20 | open an|d close |
|00003500| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 73 2c 20 |device d|rivers, |
|00003510| 74 6f 20 65 78 63 68 61 | 6e 67 65 20 69 6e 66 6f |to excha|nge info|
|00003520| 72 6d 61 74 69 6f 6e 20 | 77 69 74 68 20 74 68 65 |rmation |with the|
|00003530| 6d 2c 20 61 6e 64 20 74 | 6f 20 6f 74 68 65 72 77 |m, and t|o otherw|
|00003540| 69 73 65 20 63 6f 6e 74 | 72 6f 6c 20 61 6e 64 20 |ise cont|rol and |
|00003550| 6d 6f 6e 69 74 6f 72 20 | 74 68 65 6d 2e 0d 54 68 |monitor |them..Th|
|00003560| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00003570| 20 69 6e 63 6c 75 64 65 | 73 20 68 69 67 68 2d 6c | include|s high-l|
|00003580| 65 76 65 6c 20 61 6e 64 | 20 6c 6f 77 2d 6c 65 76 |evel and| low-lev|
|00003590| 65 6c 20 76 65 72 73 69 | 6f 6e 73 20 6f 66 20 6d |el versi|ons of m|
|000035a0| 6f 73 74 20 6f 66 20 69 | 74 73 20 72 6f 75 74 69 |ost of i|ts routi|
|000035b0| 6e 65 73 2e 20 54 68 65 | 20 68 69 67 68 2d 6c 65 |nes. The| high-le|
|000035c0| 76 65 6c 20 76 65 72 73 | 69 6f 6e 73 20 61 72 65 |vel vers|ions are|
|000035d0| 20 73 6f 6d 65 77 68 61 | 74 20 65 61 73 69 65 72 | somewha|t easier|
|000035e0| 20 74 6f 20 75 73 65 2c | 20 62 75 74 20 74 68 65 | to use,| but the|
|000035f0| 79 20 61 6c 6c 6f 77 20 | 6c 65 73 73 20 63 6f 6e |y allow |less con|
|00003600| 74 72 6f 6c 20 6f 66 20 | 68 6f 77 20 74 68 65 20 |trol of |how the |
|00003610| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 65 |Device M|anager e|
|00003620| 78 65 63 75 74 65 73 20 | 74 68 65 20 72 6f 75 74 |xecutes |the rout|
|00003630| 69 6e 65 20 28 66 6f 72 | 20 65 78 61 6d 70 6c 65 |ine (for| example|
|00003640| 2c 20 74 68 65 79 20 61 | 6c 77 61 79 73 20 65 78 |, they a|lways ex|
|00003650| 65 63 75 74 65 20 73 79 | 6e 63 68 72 6f 6e 6f 75 |ecute sy|nchronou|
|00003660| 73 6c 79 29 20 61 6e 64 | 20 74 68 65 79 20 72 65 |sly) and| they re|
|00003670| 74 75 72 6e 20 6c 65 73 | 73 20 69 6e 66 6f 72 6d |turn les|s inform|
|00003680| 61 74 69 6f 6e 20 74 6f | 20 79 6f 75 72 20 61 70 |ation to| your ap|
|00003690| 70 6c 69 63 61 74 69 6f | 6e 2e 20 43 6f 6e 76 65 |plicatio|n. Conve|
|000036a0| 72 73 65 6c 79 2c 20 74 | 68 65 20 6c 6f 77 2d 6c |rsely, t|he low-l|
|000036b0| 65 76 65 6c 20 72 6f 75 | 74 69 6e 65 73 20 72 65 |evel rou|tines re|
|000036c0| 71 75 69 72 65 20 73 6f | 6d 65 20 61 64 64 69 74 |quire so|me addit|
|000036d0| 69 6f 6e 61 6c 20 73 65 | 74 75 70 2c 20 62 75 74 |ional se|tup, but|
|000036e0| 20 74 68 65 79 20 61 6c | 6c 6f 77 20 79 6f 75 20 | they al|low you |
|000036f0| 67 72 65 61 74 65 72 20 | 63 6f 6e 74 72 6f 6c 20 |greater |control |
|00003700| 61 6e 64 20 72 65 74 75 | 72 6e 20 6d 6f 72 65 20 |and retu|rn more |
|00003710| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 0d 54 68 65 |informat|ion..The|
|00003720| 20 68 69 67 68 2d 6c 65 | 76 65 6c 20 72 6f 75 74 | high-le|vel rout|
|00003730| 69 6e 65 73 20 64 69 66 | 66 65 72 20 69 6e 20 66 |ines dif|fer in f|
|00003740| 6f 72 6d 2c 20 62 75 74 | 20 74 68 65 20 6c 6f 77 |orm, but| the low|
|00003750| 2d 6c 65 76 65 6c 20 72 | 6f 75 74 69 6e 65 73 20 |-level r|outines |
|00003760| 61 6c 6c 20 68 61 76 65 | 20 74 68 65 20 66 6f 72 |all have| the for|
|00003770| 6d 3a 0d 46 55 4e 43 54 | 49 4f 4e 20 50 42 52 6f |m:.FUNCT|ION PBRo|
|00003780| 75 74 69 6e 65 4e 61 6d | 65 09 09 09 09 09 09 09 |utineNam|e.......|
|00003790| 09 09 09 20 28 70 61 72 | 61 6d 42 6c 6f 63 6b 3a |... (par|amBlock:|
|000037a0| 20 50 61 72 6d 42 6c 6b | 50 74 72 3b 20 0d 09 09 | ParmBlk|Ptr; ...|
|000037b0| 09 09 09 09 09 09 09 09 | 09 61 73 79 6e 63 3a 20 |........|.async: |
|000037c0| 42 6f 6f 6c 65 61 6e 29 | 3a 20 4f 53 45 72 72 3b |Boolean)|: OSErr;|
|000037d0| 0d 54 68 65 20 66 69 72 | 73 74 20 70 61 72 61 6d |.The fir|st param|
|000037e0| 65 74 65 72 20 70 61 72 | 61 6d 42 6c 6f 63 6b 20 |eter par|amBlock |
|000037f0| 69 73 20 61 20 44 65 76 | 69 63 65 20 4d 61 6e 61 |is a Dev|ice Mana|
|00003800| 67 65 72 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |ger para|meter bl|
|00003810| 6f 63 6b 2e 20 59 6f 75 | 20 63 61 6e 20 75 73 65 |ock. You| can use|
|00003820| 20 66 69 65 6c 64 73 20 | 6f 66 20 74 68 69 73 20 | fields |of this |
|00003830| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 20 74 |data str|ucture t|
|00003840| 6f 20 70 61 73 73 20 6d | 6f 72 65 20 63 6f 6d 70 |o pass m|ore comp|
|00003850| 6c 65 74 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |lete inf|ormation|
|00003860| 20 74 6f 20 74 68 65 20 | 64 72 69 76 65 72 20 74 | to the |driver t|
|00003870| 68 61 6e 20 79 6f 75 20 | 63 61 6e 20 77 69 74 68 |han you |can with|
|00003880| 20 68 69 67 68 2d 6c 65 | 76 65 6c 20 72 6f 75 74 | high-le|vel rout|
|00003890| 69 6e 65 73 2c 20 61 6e | 64 20 74 68 65 20 64 72 |ines, an|d the dr|
|000038a0| 69 76 65 72 20 75 73 65 | 73 20 74 68 65 20 73 61 |iver use|s the sa|
|000038b0| 6d 65 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |me data |structur|
|000038c0| 65 20 74 6f 20 70 61 73 | 73 20 69 6e 66 6f 72 6d |e to pas|s inform|
|000038d0| 61 74 69 6f 6e 20 62 61 | 63 6b 2e 20 54 68 65 20 |ation ba|ck. The |
|000038e0| 73 65 63 74 69 6f 6e 20 | d2 44 61 74 61 20 53 74 |section |.Data St|
|000038f0| 72 75 63 74 75 72 65 73 | 2c d3 20 6f 6e 20 70 61 |ructures|,. on pa|
|00003900| 67 65 20 31 2d 31 34 2c | 20 64 69 73 63 75 73 73 |ge 1-14,| discuss|
|00003910| 65 73 20 74 68 65 20 66 | 69 65 6c 64 73 20 6f 66 |es the f|ields of|
|00003920| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 20 62 | the par|ameter b|
|00003930| 6c 6f 63 6b 20 69 6e 20 | 64 65 74 61 69 6c 2e 0d |lock in |detail..|
|00003940| 54 68 65 20 73 65 63 6f | 6e 64 20 70 61 72 61 6d |The seco|nd param|
|00003950| 65 74 65 72 20 61 73 79 | 6e 63 20 73 70 65 63 69 |eter asy|nc speci|
|00003960| 66 69 65 73 20 77 68 65 | 74 68 65 72 20 74 68 65 |fies whe|ther the|
|00003970| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00003980| 73 68 6f 75 6c 64 20 65 | 78 65 63 75 74 65 20 74 |should e|xecute t|
|00003990| 68 65 20 72 6f 75 74 69 | 6e 65 20 61 73 79 6e 63 |he routi|ne async|
|000039a0| 68 72 6f 6e 6f 75 73 6c | 79 2e 20 49 66 20 79 6f |hronousl|y. If yo|
|000039b0| 75 20 73 65 74 20 74 68 | 69 73 20 70 61 72 61 6d |u set th|is param|
|000039c0| 65 74 65 72 20 74 6f 20 | 46 41 4c 53 45 2c 20 74 |eter to |FALSE, t|
|000039d0| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|000039e0| 72 20 61 64 64 73 20 74 | 68 65 20 70 61 72 61 6d |r adds t|he param|
|000039f0| 65 74 65 72 20 62 6c 6f | 63 6b 20 74 6f 20 74 68 |eter blo|ck to th|
|00003a00| 65 20 64 72 69 76 65 72 | 20 72 65 71 75 65 73 74 |e driver| request|
|00003a10| 20 71 75 65 75 65 20 61 | 6e 64 20 77 61 69 74 73 | queue a|nd waits|
|00003a20| 20 75 6e 74 69 6c 20 74 | 68 65 20 64 72 69 76 65 | until t|he drive|
|00003a30| 72 20 63 6f 6d 70 6c 65 | 74 65 73 20 74 68 65 20 |r comple|tes the |
|00003a40| 72 65 71 75 65 73 74 20 | 28 77 68 69 63 68 20 6d |request |(which m|
|00003a50| 65 61 6e 73 20 69 74 20 | 68 61 73 20 63 6f 6d 70 |eans it |has comp|
|00003a60| 6c 65 74 65 64 20 61 6c | 6c 20 70 72 65 76 69 6f |leted al|l previo|
|00003a70| 75 73 6c 79 20 71 75 65 | 75 65 64 20 72 65 71 75 |usly que|ued requ|
|00003a80| 65 73 74 73 29 20 62 65 | 66 6f 72 65 20 72 65 74 |ests) be|fore ret|
|00003a90| 75 72 6e 69 6e 67 20 63 | 6f 6e 74 72 6f 6c 20 74 |urning c|ontrol t|
|00003aa0| 6f 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |o your a|pplicati|
|00003ab0| 6f 6e 2e 20 0d 49 66 20 | 79 6f 75 20 73 65 74 20 |on. .If |you set |
|00003ac0| 74 68 65 20 61 73 79 6e | 63 20 70 61 72 61 6d 65 |the asyn|c parame|
|00003ad0| 74 65 72 20 74 6f 20 54 | 52 55 45 2c 20 74 68 65 |ter to T|RUE, the|
|00003ae0| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00003af0| 61 64 64 73 20 74 68 65 | 20 70 61 72 61 6d 65 74 |adds the| paramet|
|00003b00| 65 72 20 62 6c 6f 63 6b | 20 74 6f 20 74 68 65 20 |er block| to the |
|00003b10| 64 72 69 76 65 72 20 72 | 65 71 75 65 73 74 20 71 |driver r|equest q|
|00003b20| 75 65 75 65 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |ueue and| returns|
|00003b30| 20 63 6f 6e 74 72 6f 6c | 20 74 6f 20 79 6f 75 72 | control| to your|
|00003b40| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 69 6d 6d | applica|tion imm|
|00003b50| 65 64 69 61 74 65 6c 79 | 2e 20 49 6e 20 74 68 69 |ediately|. In thi|
|00003b60| 73 20 63 61 73 65 2c 20 | 61 20 6e 6f 45 72 72 20 |s case, |a noErr |
|00003b70| 72 65 73 75 6c 74 20 63 | 6f 64 65 20 73 69 67 6e |result c|ode sign|
|00003b80| 69 66 69 65 73 20 74 68 | 61 74 20 74 68 65 20 72 |ifies th|at the r|
|00003b90| 65 71 75 65 73 74 20 77 | 61 73 20 73 75 63 63 65 |equest w|as succe|
|00003ba0| 73 73 66 75 6c 6c 79 20 | 71 75 65 75 65 64 2c 20 |ssfully |queued, |
|00003bb0| 6e 6f 74 20 74 68 61 74 | 20 74 68 65 20 72 65 71 |not that| the req|
|00003bc0| 75 65 73 74 20 77 61 73 | 20 73 75 63 63 65 73 73 |uest was| success|
|00003bd0| 66 75 6c 6c 79 20 63 6f | 6d 70 6c 65 74 65 64 2e |fully co|mpleted.|
|00003be0| 20 59 6f 75 72 20 61 70 | 70 6c 69 63 61 74 69 6f | Your ap|plicatio|
|00003bf0| 6e 20 63 61 6e 20 64 65 | 74 65 72 6d 69 6e 65 20 |n can de|termine |
|00003c00| 77 68 65 6e 20 74 68 65 | 20 64 72 69 76 65 72 20 |when the| driver |
|00003c10| 68 61 73 20 63 6f 6d 70 | 6c 65 74 65 64 20 74 68 |has comp|leted th|
|00003c20| 65 20 72 65 71 75 65 73 | 74 20 62 79 20 70 65 72 |e reques|t by per|
|00003c30| 69 6f 64 69 63 61 6c 6c | 79 20 70 6f 6c 6c 69 6e |iodicall|y pollin|
|00003c40| 67 20 74 68 65 20 69 6f | 52 65 73 75 6c 74 20 66 |g the io|Result f|
|00003c50| 69 65 6c 64 20 6f 66 20 | 74 68 65 20 70 61 72 61 |ield of |the para|
|00003c60| 6d 65 74 65 72 20 62 6c | 6f 63 6b 2e 20 54 68 65 |meter bl|ock. The|
|00003c70| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00003c80| 73 65 74 73 20 74 68 69 | 73 20 66 69 65 6c 64 20 |sets thi|s field |
|00003c90| 74 6f 20 31 20 77 68 65 | 6e 20 74 68 65 20 72 65 |to 1 whe|n the re|
|00003ca0| 71 75 65 73 74 20 69 73 | 20 71 75 65 75 65 64 2c |quest is| queued,|
|00003cb0| 20 61 6e 64 20 74 68 65 | 20 64 72 69 76 65 72 20 | and the| driver |
|00003cc0| 73 74 6f 72 65 73 20 74 | 68 65 20 61 63 74 75 61 |stores t|he actua|
|00003cd0| 6c 20 72 65 73 75 6c 74 | 20 63 6f 64 65 20 74 68 |l result| code th|
|00003ce0| 65 72 65 20 77 68 65 6e | 20 69 74 20 63 6f 6d 70 |ere when| it comp|
|00003cf0| 6c 65 74 65 73 20 74 68 | 65 20 72 65 71 75 65 73 |letes th|e reques|
|00003d00| 74 2e 0d 59 6f 75 20 63 | 61 6e 20 61 6c 73 6f 20 |t..You c|an also |
|00003d10| 70 72 6f 76 69 64 65 20 | 61 20 70 6f 69 6e 74 65 |provide |a pointe|
|00003d20| 72 20 74 6f 20 61 20 63 | 6f 6d 70 6c 65 74 69 6f |r to a c|ompletio|
|00003d30| 6e 20 72 6f 75 74 69 6e | 65 20 69 6e 20 74 68 65 |n routin|e in the|
|00003d40| 20 69 6f 43 6f 6d 70 6c | 65 74 69 6f 6e 20 66 69 | ioCompl|etion fi|
|00003d50| 65 6c 64 20 6f 66 20 74 | 68 65 20 70 61 72 61 6d |eld of t|he param|
|00003d60| 65 74 65 72 20 62 6c 6f | 63 6b 2e 20 54 68 65 20 |eter blo|ck. The |
|00003d70| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 65 |Device M|anager e|
|00003d80| 78 65 63 75 74 65 73 20 | 74 68 69 73 20 72 6f 75 |xecutes |this rou|
|00003d90| 74 69 6e 65 20 77 68 65 | 6e 20 74 68 65 20 64 72 |tine whe|n the dr|
|00003da0| 69 76 65 72 20 63 6f 6d | 70 6c 65 74 65 73 20 74 |iver com|pletes t|
|00003db0| 68 65 20 61 73 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |he async|hronous |
|00003dc0| 72 65 71 75 65 73 74 2e | 20 0d 41 53 53 45 4d 42 |request.| .ASSEMB|
|00003dd0| 4c 59 2d 4c 41 4e 47 55 | 41 47 45 20 4e 4f 54 45 |LY-LANGU|AGE NOTE|
|00003de0| 0d 59 6f 75 20 63 61 6e | 20 63 61 6c 6c 20 61 20 |.You can| call a |
|00003df0| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 72 |Device M|anager r|
|00003e00| 6f 75 74 69 6e 65 20 61 | 73 79 6e 63 68 72 6f 6e |outine a|synchron|
|00003e10| 6f 75 73 6c 79 2c 20 62 | 79 70 61 73 73 69 6e 67 |ously, b|ypassing|
|00003e20| 20 74 68 65 20 72 65 71 | 75 65 73 74 20 71 75 65 | the req|uest que|
|00003e30| 75 65 2c 20 62 79 20 73 | 65 74 74 69 6e 67 20 74 |ue, by s|etting t|
|00003e40| 68 65 20 69 6d 6d 65 64 | 69 61 74 65 20 62 69 74 |he immed|iate bit|
|00003e50| 20 28 62 69 74 20 39 29 | 20 6f 66 20 74 68 65 20 | (bit 9)| of the |
|00003e60| 74 72 61 70 20 77 6f 72 | 64 2e 20 48 6f 77 65 76 |trap wor|d. Howev|
|00003e70| 65 72 2c 20 72 65 6d 65 | 6d 62 65 72 20 74 68 61 |er, reme|mber tha|
|00003e80| 74 20 74 68 65 20 64 72 | 69 76 65 72 20 6d 69 67 |t the dr|iver mig|
|00003e90| 68 74 20 68 61 76 65 20 | 61 6e 20 61 73 79 6e 63 |ht have |an async|
|00003ea0| 68 72 6f 6e 6f 75 73 20 | 72 65 71 75 65 73 74 20 |hronous |request |
|00003eb0| 70 65 6e 64 69 6e 67 2e | 20 49 6e 20 66 61 63 74 |pending.| In fact|
|00003ec0| 2c 20 69 66 20 79 6f 75 | 20 6d 61 6b 65 20 61 6e |, if you| make an|
|00003ed0| 20 69 6d 6d 65 64 69 61 | 74 65 20 72 65 71 75 65 | immedia|te reque|
|00003ee0| 73 74 20 64 75 72 69 6e | 67 20 69 6e 74 65 72 72 |st durin|g interr|
|00003ef0| 75 70 74 20 74 69 6d 65 | 2c 20 74 68 65 20 64 72 |upt time|, the dr|
|00003f00| 69 76 65 72 20 6d 69 67 | 68 74 20 62 65 20 63 75 |iver mig|ht be cu|
|00003f10| 72 72 65 6e 74 6c 79 20 | 65 78 65 63 75 74 69 6e |rrently |executin|
|00003f20| 67 20 61 6e 6f 74 68 65 | 72 20 72 65 71 75 65 73 |g anothe|r reques|
|00003f30| 74 2e 20 42 65 20 73 75 | 72 65 20 74 68 65 20 64 |t. Be su|re the d|
|00003f40| 72 69 76 65 72 20 69 73 | 20 72 65 65 6e 74 72 61 |river is| reentra|
|00003f50| 6e 74 d1 74 68 61 74 20 | 69 73 2c 20 74 68 61 74 |nt.that |is, that|
|00003f60| 20 69 74 20 63 61 6e 20 | 68 61 6e 64 6c 65 20 74 | it can |handle t|
|00003f70| 68 65 73 65 20 73 69 74 | 75 61 74 69 6f 6e 73 2e |hese sit|uations.|
|00003f80| 3c 33 36 70 74 5c 3e 5c | 78 31 32 20 3c 38 62 61 |<36pt\>\|x12 <8ba|
|00003f90| 74 5c 3e 75 0d 4f 70 65 | 6e 69 6e 67 20 61 6e 64 |t\>u.Ope|ning and|
|00003fa0| 20 43 6c 6f 73 69 6e 67 | 20 44 65 76 69 63 65 20 | Closing| Device |
|00003fb0| 44 72 69 76 65 72 73 0d | 59 6f 75 20 6d 75 73 74 |Drivers.|You must|
|00003fc0| 20 6f 70 65 6e 20 61 20 | 64 72 69 76 65 72 20 62 | open a |driver b|
|00003fd0| 65 66 6f 72 65 20 79 6f | 75 72 20 61 70 70 6c 69 |efore yo|ur appli|
|00003fe0| 63 61 74 69 6f 6e 20 63 | 61 6e 20 63 6f 6d 6d 75 |cation c|an commu|
|00003ff0| 6e 69 63 61 74 65 20 77 | 69 74 68 20 69 74 2e 20 |nicate w|ith it. |
|00004000| 54 68 65 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |The Devi|ce Manag|
|00004010| 65 72 20 70 72 6f 76 69 | 64 65 73 20 74 68 72 65 |er provi|des thre|
|00004020| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 66 6f 72 20 |e functi|ons for |
|00004030| 6f 70 65 6e 69 6e 67 20 | 64 65 76 69 63 65 20 64 |opening |device d|
|00004040| 72 69 76 65 72 73 3a 20 | 4f 70 65 6e 44 72 69 76 |rivers: |OpenDriv|
|00004050| 65 72 2c 20 50 42 4f 70 | 65 6e 2c 20 61 6e 64 20 |er, PBOp|en, and |
|00004060| 4f 70 65 6e 53 6c 6f 74 | 2e 20 45 61 63 68 20 6f |OpenSlot|. Each o|
|00004070| 66 20 74 68 65 73 65 20 | 66 75 6e 63 74 69 6f 6e |f these |function|
|00004080| 73 20 72 65 71 75 69 72 | 65 73 20 61 20 64 72 69 |s requir|es a dri|
|00004090| 76 65 72 20 6e 61 6d 65 | 20 61 6e 64 20 72 65 74 |ver name| and ret|
|000040a0| 75 72 6e 73 20 61 20 64 | 72 69 76 65 72 20 72 65 |urns a d|river re|
|000040b0| 66 65 72 65 6e 63 65 20 | 6e 75 6d 62 65 72 2e 0d |ference |number..|
|000040c0| 41 20 64 72 69 76 65 72 | 20 6e 61 6d 65 20 63 6f |A driver| name co|
|000040d0| 6e 73 69 73 74 73 20 6f | 66 20 61 20 70 65 72 69 |nsists o|f a peri|
|000040e0| 6f 64 20 28 2e 29 20 66 | 6f 6c 6c 6f 77 65 64 20 |od (.) f|ollowed |
|000040f0| 62 79 20 61 6e 79 20 73 | 65 71 75 65 6e 63 65 20 |by any s|equence |
|00004100| 6f 66 20 31 20 74 6f 20 | 32 35 34 20 70 72 69 6e |of 1 to |254 prin|
|00004110| 74 69 6e 67 20 63 68 61 | 72 61 63 74 65 72 73 3b |ting cha|racters;|
|00004120| 20 66 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 2e 41 | for exa|mple, .A|
|00004130| 54 50 20 69 73 20 74 68 | 65 20 6e 61 6d 65 20 6f |TP is th|e name o|
|00004140| 66 20 6f 6e 65 20 6f 66 | 20 74 68 65 20 68 69 67 |f one of| the hig|
|00004150| 68 2d 6c 65 76 65 6c 20 | 41 70 70 6c 65 54 61 6c |h-level |AppleTal|
|00004160| 6b 20 64 72 69 76 65 72 | 73 2e 0d 54 68 65 20 69 |k driver|s..The i|
|00004170| 6e 69 74 69 61 6c 20 70 | 65 72 69 6f 64 20 69 6e |nitial p|eriod in|
|00004180| 20 61 20 64 72 69 76 65 | 72 20 6e 61 6d 65 20 61 | a drive|r name a|
|00004190| 6c 6c 6f 77 73 20 74 68 | 65 20 44 65 76 69 63 65 |llows th|e Device|
|000041a0| 20 4d 61 6e 61 67 65 72 | 20 61 6e 64 20 74 68 65 | Manager| and the|
|000041b0| 20 46 69 6c 65 20 4d 61 | 6e 61 67 65 72 2c 20 77 | File Ma|nager, w|
|000041c0| 68 69 63 68 20 62 6f 74 | 68 20 75 73 65 20 74 68 |hich bot|h use th|
|000041d0| 65 20 50 42 4f 70 65 6e | 20 66 75 6e 63 74 69 6f |e PBOpen| functio|
|000041e0| 6e 2c 20 74 6f 20 64 69 | 73 74 69 6e 67 75 69 73 |n, to di|stinguis|
|000041f0| 68 20 62 65 74 77 65 65 | 6e 20 64 65 76 69 63 65 |h betwee|n device|
|00004200| 20 64 72 69 76 65 72 20 | 6e 61 6d 65 73 20 61 6e | driver |names an|
|00004210| 64 20 66 69 6c 65 20 6e | 61 6d 65 73 2e 20 46 6f |d file n|ames. Fo|
|00004220| 72 20 74 68 65 20 73 61 | 6d 65 20 72 65 61 73 6f |r the sa|me reaso|
|00004230| 6e 2c 20 66 69 6c 65 6e | 61 6d 65 73 20 73 68 6f |n, filen|ames sho|
|00004240| 75 6c 64 20 6e 6f 74 20 | 73 74 61 72 74 20 77 69 |uld not |start wi|
|00004250| 74 68 20 61 20 70 65 72 | 69 6f 64 2e 12 3c 33 36 |th a per|iod..<36|
|00004260| 70 74 5c 3e 5c 78 31 32 | 20 3c 38 62 61 74 5c 3e |pt\>\x12| <8bat\>|
|00004270| 75 0d 54 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |u.The De|vice Man|
|00004280| 61 67 65 72 20 61 73 73 | 69 67 6e 73 20 65 61 63 |ager ass|igns eac|
|00004290| 68 20 6f 70 65 6e 20 64 | 65 76 69 63 65 20 64 72 |h open d|evice dr|
|000042a0| 69 76 65 72 20 61 20 64 | 72 69 76 65 72 20 72 65 |iver a d|river re|
|000042b0| 66 65 72 65 6e 63 65 20 | 6e 75 6d 62 65 72 2e 20 |ference |number. |
|000042c0| 54 68 69 73 20 6e 75 6d | 62 65 72 20 61 6c 6c 6f |This num|ber allo|
|000042d0| 77 73 20 74 68 65 20 44 | 65 76 69 63 65 20 4d 61 |ws the D|evice Ma|
|000042e0| 6e 61 67 65 72 20 74 6f | 20 6c 6f 63 61 74 65 20 |nager to| locate |
|000042f0| 74 68 65 20 64 72 69 76 | 65 72 d5 73 20 64 65 76 |the driv|er.s dev|
|00004300| 69 63 65 20 63 6f 6e 74 | 72 6f 6c 20 65 6e 74 72 |ice cont|rol entr|
|00004310| 79 20 69 6e 20 74 68 65 | 20 75 6e 69 74 20 74 61 |y in the| unit ta|
|00004320| 62 6c 65 2e 0d 54 68 65 | 20 4f 70 65 6e 44 72 69 |ble..The| OpenDri|
|00004330| 76 65 72 20 66 75 6e 63 | 74 69 6f 6e 2c 20 77 68 |ver func|tion, wh|
|00004340| 69 63 68 20 69 73 20 74 | 68 65 20 68 69 67 68 2d |ich is t|he high-|
|00004350| 6c 65 76 65 6c 20 6f 70 | 65 6e 69 6e 67 20 72 6f |level op|ening ro|
|00004360| 75 74 69 6e 65 2c 20 74 | 61 6b 65 73 20 74 68 65 |utine, t|akes the|
|00004370| 20 64 72 69 76 65 72 20 | 6e 61 6d 65 20 61 73 20 | driver |name as |
|00004380| 69 74 73 20 66 69 72 73 | 74 20 70 61 72 61 6d 65 |its firs|t parame|
|00004390| 74 65 72 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |ter and |returns |
|000043a0| 74 68 65 20 64 72 69 76 | 65 72 20 72 65 66 65 72 |the driv|er refer|
|000043b0| 65 6e 63 65 20 6e 75 6d | 62 65 72 20 69 6e 20 69 |ence num|ber in i|
|000043c0| 74 73 20 73 65 63 6f 6e | 64 20 70 61 72 61 6d 65 |ts secon|d parame|
|000043d0| 74 65 72 2e 0d 4c 69 73 | 74 69 6e 67 20 31 2d 31 |ter..Lis|ting 1-1|
|000043e0| 20 73 68 6f 77 73 20 68 | 6f 77 20 74 6f 20 75 73 | shows h|ow to us|
|000043f0| 65 20 74 68 65 20 4f 70 | 65 6e 44 72 69 76 65 72 |e the Op|enDriver|
|00004400| 20 66 75 6e 63 74 69 6f | 6e 20 74 6f 20 6f 70 65 | functio|n to ope|
|00004410| 6e 20 61 20 64 72 69 76 | 65 72 20 66 72 6f 6d 20 |n a driv|er from |
|00004420| 61 20 72 65 73 6f 75 72 | 63 65 20 66 69 6c 65 2e |a resour|ce file.|
|00004430| 0d 4f 70 65 6e 69 6e 67 | 20 61 20 64 65 76 69 63 |.Opening| a devic|
|00004440| 65 20 64 72 69 76 65 72 | 20 66 72 6f 6d 20 61 20 |e driver| from a |
|00004450| 72 65 73 6f 75 72 63 65 | 20 66 69 6c 65 0d 56 41 |resource| file.VA|
|00004460| 52 20 09 67 44 72 76 72 | 52 65 66 4e 75 6d 09 09 |R .gDrvr|RefNum..|
|00004470| 09 3a 20 49 6e 74 65 67 | 65 72 3b 0d 50 52 4f 43 |.: Integ|er;.PROC|
|00004480| 45 44 55 52 45 20 4d 79 | 4f 70 65 6e 44 72 69 76 |EDURE My|OpenDriv|
|00004490| 65 72 3b 0d 09 09 09 09 | 56 41 52 0d 09 09 09 09 |er;.....|VAR.....|
|000044a0| 09 64 72 76 72 48 64 6c | 09 09 3a 20 48 61 6e 64 |.drvrHdl|..: Hand|
|000044b0| 6c 65 3b 0d 09 09 09 09 | 09 64 72 76 72 49 44 09 |le;.....|.drvrID.|
|000044c0| 09 3a 20 49 6e 74 65 67 | 65 72 3b 0d 09 09 09 09 |.: Integ|er;.....|
|000044d0| 09 74 65 6d 70 44 72 76 | 72 49 44 09 3a 20 49 6e |.tempDrv|rID.: In|
|000044e0| 74 65 67 65 72 3b 0d 09 | 09 09 09 09 64 72 76 72 |teger;..|....drvr|
|000044f0| 54 79 70 65 09 3a 20 52 | 65 73 54 79 70 65 3b 0d |Type.: R|esType;.|
|00004500| 09 09 09 09 09 64 72 76 | 72 4e 61 6d 65 09 3a 20 |.....drv|rName.: |
|00004510| 53 74 72 32 35 35 3b 0d | 09 09 09 09 09 65 72 72 |Str255;.|.....err|
|00004520| 09 09 09 3a 20 4f 53 45 | 72 72 3b 0d 09 09 0d 09 |...: OSE|rr;.....|
|00004530| 09 09 09 42 45 47 49 4e | 0d 09 09 09 09 09 74 65 |...BEGIN|......te|
|00004540| 6d 70 44 72 76 72 49 44 | 20 3a 3d 20 46 69 6e 64 |mpDrvrID| := Find|
|00004550| 45 6d 70 74 79 53 70 61 | 63 65 49 6e 55 6e 69 74 |EmptySpa|ceInUnit|
|00004560| 54 61 62 6c 65 3b 0d 09 | 0d 09 09 09 09 09 64 72 |Table;..|......dr|
|00004570| 76 72 48 64 6c 20 3a 3d | 20 47 65 74 4e 61 6d 65 |vrHdl :=| GetName|
|00004580| 64 52 65 73 6f 75 72 63 | 65 28 27 44 52 56 52 27 |dResourc|e('DRVR'|
|00004590| 2c 27 2e 44 52 49 56 45 | 52 27 29 3b 0d 09 09 09 |,'.DRIVE|R');....|
|000045a0| 09 09 47 65 74 52 65 73 | 49 6e 66 6f 28 64 72 76 |..GetRes|Info(drv|
|000045b0| 72 48 64 6c 2c 20 64 72 | 76 72 49 44 2c 20 64 72 |rHdl, dr|vrID, dr|
|000045c0| 76 72 54 79 70 65 2c 20 | 64 72 76 72 4e 61 6d 65 |vrType, |drvrName|
|000045d0| 29 3b 0d 09 09 09 09 09 | 53 65 74 52 65 73 49 6e |);......|SetResIn|
|000045e0| 66 6f 28 64 72 76 72 48 | 64 6c 2c 20 74 65 6d 70 |fo(drvrH|dl, temp|
|000045f0| 44 72 76 72 49 44 2c 20 | 64 72 76 72 4e 61 6d 65 |DrvrID, |drvrName|
|00004600| 29 3b 0d 09 0d 09 09 09 | 09 09 65 72 72 20 3a 3d |);......|..err :=|
|00004610| 20 4f 70 65 6e 44 72 69 | 76 65 72 28 27 2e 44 52 | OpenDri|ver('.DR|
|00004620| 49 56 45 52 27 2c 67 44 | 72 76 72 52 65 66 4e 75 |IVER',gD|rvrRefNu|
|00004630| 6d 29 3b 0d 09 0d 09 09 | 09 09 09 49 46 20 28 65 |m);.....|...IF (e|
|00004640| 72 72 20 3d 20 4e 6f 45 | 72 72 29 20 54 48 45 4e |rr = NoE|rr) THEN|
|00004650| 0d 09 09 09 09 09 09 44 | 65 74 61 63 68 52 65 73 |.......D|etachRes|
|00004660| 6f 75 72 63 65 28 64 72 | 76 72 48 64 6c 29 3b 0d |ource(dr|vrHdl);.|
|00004670| 09 09 0d 09 09 09 09 09 | 64 72 76 72 48 64 6c 20 |........|drvrHdl |
|00004680| 3a 3d 20 47 65 74 4e 61 | 6d 65 64 52 65 73 6f 75 |:= GetNa|medResou|
|00004690| 72 63 65 28 27 44 52 56 | 52 27 2c 64 72 76 72 4e |rce('DRV|R',drvrN|
|000046a0| 61 6d 65 29 3b 0d 09 09 | 09 09 09 53 65 74 52 65 |ame);...|...SetRe|
|000046b0| 73 49 6e 66 6f 28 64 72 | 76 72 48 64 6c 2c 64 72 |sInfo(dr|vrHdl,dr|
|000046c0| 76 72 49 44 2c 20 64 72 | 76 72 4e 61 6d 65 29 3b |vrID, dr|vrName);|
|000046d0| 0d 09 09 09 09 45 4e 44 | 3b 0d 54 68 65 20 4f 70 |.....END|;.The Op|
|000046e0| 65 6e 44 72 69 76 65 72 | 20 66 75 6e 63 74 69 6f |enDriver| functio|
|000046f0| 6e 20 75 73 65 73 20 74 | 68 65 20 72 65 73 6f 75 |n uses t|he resou|
|00004700| 72 63 65 20 49 44 20 6f | 66 20 74 68 65 20 64 72 |rce ID o|f the dr|
|00004710| 69 76 65 72 20 72 65 73 | 6f 75 72 63 65 20 74 6f |iver res|ource to|
|00004720| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 65 72 65 | determi|ne where|
|00004730| 20 69 6e 20 74 68 65 20 | 75 6e 69 74 20 74 61 62 | in the |unit tab|
|00004740| 6c 65 20 74 6f 20 73 74 | 6f 72 65 20 74 68 65 20 |le to st|ore the |
|00004750| 64 65 76 69 63 65 20 63 | 6f 6e 74 72 6f 6c 20 65 |device c|ontrol e|
|00004760| 6e 74 72 79 20 66 6f 72 | 20 74 68 65 20 64 72 69 |ntry for| the dri|
|00004770| 76 65 72 2e 20 55 6e 66 | 6f 72 74 75 6e 61 74 65 |ver. Unf|ortunate|
|00004780| 6c 79 2c 20 74 68 65 20 | 4f 70 65 6e 44 72 69 76 |ly, the |OpenDriv|
|00004790| 65 72 20 66 75 6e 63 74 | 69 6f 6e 20 64 6f 65 73 |er funct|ion does|
|000047a0| 20 6e 6f 74 20 63 68 65 | 63 6b 20 74 6f 20 73 65 | not che|ck to se|
|000047b0| 65 20 69 66 20 61 6e 6f | 74 68 65 72 20 64 65 76 |e if ano|ther dev|
|000047c0| 69 63 65 20 63 6f 6e 74 | 72 6f 6c 20 65 6e 74 72 |ice cont|rol entr|
|000047d0| 79 20 69 73 20 61 6c 72 | 65 61 64 79 20 6c 6f 63 |y is alr|eady loc|
|000047e0| 61 74 65 64 20 69 6e 20 | 74 68 61 74 20 70 6f 73 |ated in |that pos|
|000047f0| 69 74 69 6f 6e 20 69 6e | 20 74 68 65 20 75 6e 69 |ition in| the uni|
|00004800| 74 20 74 61 62 6c 65 2e | 0d 54 68 65 72 65 66 6f |t table.|.Therefo|
|00004810| 72 65 2c 20 74 68 65 20 | 4d 79 4f 70 65 6e 44 72 |re, the |MyOpenDr|
|00004820| 69 76 65 72 20 70 72 6f | 63 65 64 75 72 65 20 62 |iver pro|cedure b|
|00004830| 65 67 69 6e 73 20 62 79 | 20 66 69 6e 64 69 6e 67 |egins by| finding|
|00004840| 20 61 6e 20 65 6d 70 74 | 79 20 73 70 61 63 65 20 | an empt|y space |
|00004850| 69 6e 20 74 68 65 20 75 | 6e 69 74 20 74 61 62 6c |in the u|nit tabl|
|00004860| 65 20 61 6e 64 20 74 68 | 65 6e 20 63 68 61 6e 67 |e and th|en chang|
|00004870| 65 73 20 74 68 65 20 72 | 65 73 6f 75 72 63 65 20 |es the r|esource |
|00004880| 49 44 20 6f 66 20 74 68 | 65 20 64 72 69 76 65 72 |ID of th|e driver|
|00004890| 20 72 65 73 6f 75 72 63 | 65 20 62 65 66 6f 72 65 | resourc|e before|
|000048a0| 20 63 61 6c 6c 69 6e 67 | 20 74 68 65 20 4f 70 65 | calling| the Ope|
|000048b0| 6e 44 72 69 76 65 72 20 | 66 75 6e 63 74 69 6f 6e |nDriver |function|
|000048c0| 2e 20 28 54 68 65 20 63 | 68 61 70 74 65 72 20 d2 |. (The c|hapter .|
|000048d0| 57 72 69 74 69 6e 67 20 | 59 6f 75 72 20 4f 77 6e |Writing |Your Own|
|000048e0| 20 44 65 76 69 63 65 20 | 44 72 69 76 65 72 d3 20 | Device |Driver. |
|000048f0| 67 69 76 65 73 20 61 20 | 63 6f 6d 70 6c 65 74 65 |gives a |complete|
|00004900| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 6f 66 20 74 | definit|ion of t|
|00004910| 68 65 20 46 69 6e 64 45 | 6d 70 74 79 53 70 61 63 |he FindE|mptySpac|
|00004920| 65 49 6e 55 6e 69 74 54 | 61 62 6c 65 20 66 75 6e |eInUnitT|able fun|
|00004930| 63 74 69 6f 6e 2e 29 0d | 41 66 74 65 72 20 74 68 |ction.).|After th|
|00004940| 65 20 64 72 69 76 65 72 | 20 69 73 20 6f 70 65 6e |e driver| is open|
|00004950| 2c 20 74 68 65 20 4d 79 | 4f 70 65 6e 44 72 69 76 |, the My|OpenDriv|
|00004960| 65 72 20 70 72 6f 63 65 | 64 75 72 65 20 64 65 74 |er proce|dure det|
|00004970| 61 63 68 65 73 20 74 68 | 65 20 72 65 73 6f 75 72 |aches th|e resour|
|00004980| 63 65 20 61 6e 64 20 72 | 65 73 74 6f 72 65 73 20 |ce and r|estores |
|00004990| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 20 72 65 73 |the orig|inal res|
|000049a0| 6f 75 72 63 65 20 49 44 | 2e 0d 54 68 65 20 50 42 |ource ID|..The PB|
|000049b0| 4f 70 65 6e 20 61 6e 64 | 20 4f 70 65 6e 53 6c 6f |Open and| OpenSlo|
|000049c0| 74 20 66 75 6e 63 74 69 | 6f 6e 73 2c 20 77 68 69 |t functi|ons, whi|
|000049d0| 63 68 20 61 72 65 20 6c | 6f 77 2d 6c 65 76 65 6c |ch are l|ow-level|
|000049e0| 20 66 75 6e 63 74 69 6f | 6e 73 2c 20 75 73 65 20 | functio|ns, use |
|000049f0| 74 68 65 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |the Devi|ce Manag|
|00004a00| 65 72 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |er param|eter blo|
|00004a10| 63 6b 2c 20 77 68 69 63 | 68 20 69 73 20 64 65 73 |ck, whic|h is des|
|00004a20| 63 72 69 62 65 64 20 66 | 75 6c 6c 79 20 69 6e 20 |cribed f|ully in |
|00004a30| d2 44 61 74 61 20 53 74 | 72 75 63 74 75 72 65 73 |.Data St|ructures|
|00004a40| d3 20 6f 6e 20 70 61 67 | 65 20 31 2d 31 34 2e 20 |. on pag|e 1-14. |
|00004a50| 42 6f 74 68 20 6f 66 20 | 74 68 65 73 65 20 66 75 |Both of |these fu|
|00004a60| 6e 63 74 69 6f 6e 73 20 | 65 78 70 65 63 74 20 61 |nctions |expect a|
|00004a70| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00004a80| 64 72 69 76 65 72 20 6e | 61 6d 65 20 69 6e 20 74 |driver n|ame in t|
|00004a90| 68 65 20 69 6f 4e 61 6d | 65 50 74 72 20 66 69 65 |he ioNam|ePtr fie|
|00004aa0| 6c 64 20 6f 66 20 74 68 | 65 20 70 61 72 61 6d 65 |ld of th|e parame|
|00004ab0| 74 65 72 20 62 6c 6f 63 | 6b 20 61 6e 64 20 72 65 |ter bloc|k and re|
|00004ac0| 74 75 72 6e 20 74 68 65 | 20 72 65 66 65 72 65 6e |turn the| referen|
|00004ad0| 63 65 20 6e 75 6d 62 65 | 72 20 69 6e 20 74 68 65 |ce numbe|r in the|
|00004ae0| 20 69 6f 52 65 66 4e 75 | 6d 20 66 69 65 6c 64 2e | ioRefNu|m field.|
|00004af0| 20 0d 59 6f 75 20 75 73 | 65 20 74 68 65 20 50 42 | .You us|e the PB|
|00004b00| 4f 70 65 6e 20 61 6e 64 | 20 4f 70 65 6e 53 6c 6f |Open and| OpenSlo|
|00004b10| 74 20 66 75 6e 63 74 69 | 6f 6e 73 20 69 6e 20 70 |t functi|ons in p|
|00004b20| 72 65 66 65 72 65 6e 63 | 65 20 74 6f 20 74 68 65 |referenc|e to the|
|00004b30| 20 4f 70 65 6e 44 72 69 | 76 65 72 20 66 75 6e 63 | OpenDri|ver func|
|00004b40| 74 69 6f 6e 20 77 68 65 | 6e 20 79 6f 75 20 77 61 |tion whe|n you wa|
|00004b50| 6e 74 20 6d 6f 72 65 20 | 63 6f 6e 74 72 6f 6c 20 |nt more |control |
|00004b60| 6f 76 65 72 20 68 6f 77 | 20 74 68 65 20 44 65 76 |over how| the Dev|
|00004b70| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 6f 70 65 6e |ice Mana|ger open|
|00004b80| 73 20 74 68 65 20 64 65 | 76 69 63 65 20 64 72 69 |s the de|vice dri|
|00004b90| 76 65 72 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |ver. For| example|
|00004ba0| 2c 20 79 6f 75 20 63 61 | 6e 20 73 65 74 20 72 65 |, you ca|n set re|
|00004bb0| 61 64 20 61 6e 64 20 77 | 72 69 74 65 20 70 65 72 |ad and w|rite per|
|00004bc0| 6d 69 73 73 69 6f 6e 73 | 20 66 6f 72 20 74 68 65 |missions| for the|
|00004bd0| 20 64 65 76 69 63 65 20 | 77 69 74 68 20 74 68 65 | device |with the|
|00004be0| 20 69 6f 50 65 72 6d 73 | 73 6e 20 66 69 65 6c 64 | ioPerms|sn field|
|00004bf0| 20 6f 66 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 | of the |paramete|
|00004c00| 72 20 62 6c 6f 63 6b 2e | 0d 59 6f 75 20 75 73 65 |r block.|.You use|
|00004c10| 20 74 68 65 20 4f 70 65 | 6e 53 6c 6f 74 20 66 75 | the Ope|nSlot fu|
|00004c20| 6e 63 74 69 6f 6e 20 74 | 6f 20 6f 70 65 6e 20 64 |nction t|o open d|
|00004c30| 72 69 76 65 72 73 20 74 | 68 61 74 20 73 65 72 76 |rivers t|hat serv|
|00004c40| 65 20 73 6c 6f 74 20 64 | 65 76 69 63 65 73 2e 20 |e slot d|evices. |
|00004c50| 54 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 75 73 |This fun|ction us|
|00004c60| 65 73 20 61 6e 20 65 78 | 74 65 6e 64 65 64 20 70 |es an ex|tended p|
|00004c70| 61 72 61 6d 65 74 65 72 | 20 62 6c 6f 63 6b 20 74 |arameter| block t|
|00004c80| 68 61 74 20 69 6e 63 6c | 75 64 65 73 20 65 78 74 |hat incl|udes ext|
|00004c90| 72 61 20 66 69 65 6c 64 | 73 20 73 70 65 63 69 66 |ra field|s specif|
|00004ca0| 69 63 20 74 6f 20 73 6c | 6f 74 20 64 65 76 69 63 |ic to sl|ot devic|
|00004cb0| 65 20 64 72 69 76 65 72 | 73 2e 20 59 6f 75 20 75 |e driver|s. You u|
|00004cc0| 73 65 20 74 68 65 20 50 | 42 4f 70 65 6e 20 66 75 |se the P|BOpen fu|
|00004cd0| 6e 63 74 69 6f 6e 20 74 | 6f 20 6f 70 65 6e 20 61 |nction t|o open a|
|00004ce0| 6e 79 20 6f 74 68 65 72 | 20 64 65 76 69 63 65 20 |ny other| device |
|00004cf0| 64 72 69 76 65 72 73 2e | 0d 59 6f 75 20 6d 75 73 |drivers.|.You mus|
|00004d00| 74 20 6f 70 65 6e 20 64 | 65 76 69 63 65 20 64 72 |t open d|evice dr|
|00004d10| 69 76 65 72 73 20 73 79 | 6e 63 68 72 6f 6e 6f 75 |ivers sy|nchronou|
|00004d20| 73 6c 79 2e 20 49 66 20 | 61 20 64 65 76 69 63 65 |sly. If |a device|
|00004d30| 20 64 72 69 76 65 72 20 | 69 73 20 61 6c 72 65 61 | driver |is alrea|
|00004d40| 64 79 20 6f 70 65 6e 2c | 20 74 68 65 20 64 72 69 |dy open,| the dri|
|00004d50| 76 65 72 2d 6f 70 65 6e | 69 6e 67 20 72 6f 75 74 |ver-open|ing rout|
|00004d60| 69 6e 65 73 20 73 69 6d | 70 6c 79 20 72 65 74 75 |ines sim|ply retu|
|00004d70| 72 6e 20 74 68 65 20 64 | 72 69 76 65 72 20 72 65 |rn the d|river re|
|00004d80| 66 65 72 65 6e 63 65 20 | 6e 75 6d 62 65 72 2e 0d |ference |number..|
|00004d90| 54 68 65 20 72 65 6d 61 | 69 6e 69 6e 67 20 44 65 |The rema|ining De|
|00004da0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 72 6f 75 |vice Man|ager rou|
|00004db0| 74 69 6e 65 73 20 72 65 | 71 75 69 72 65 20 79 6f |tines re|quire yo|
|00004dc0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 74 |ur appli|cation t|
|00004dd0| 6f 20 75 73 65 20 74 68 | 65 20 72 65 66 65 72 65 |o use th|e refere|
|00004de0| 6e 63 65 20 6e 75 6d 62 | 65 72 2c 20 69 6e 73 74 |nce numb|er, inst|
|00004df0| 65 61 64 20 6f 66 20 74 | 68 65 20 64 72 69 76 65 |ead of t|he drive|
|00004e00| 72 20 6e 61 6d 65 2c 20 | 77 68 65 6e 20 72 65 66 |r name, |when ref|
|00004e10| 65 72 72 69 6e 67 20 74 | 6f 20 61 20 64 65 76 69 |erring t|o a devi|
|00004e20| 63 65 2e 0d 57 68 65 6e | 20 79 6f 75 20 61 72 65 |ce..When| you are|
|00004e30| 20 64 6f 6e 65 20 75 73 | 69 6e 67 20 61 20 64 72 | done us|ing a dr|
|00004e40| 69 76 65 72 2c 20 79 6f | 75 20 6d 61 79 20 77 61 |iver, yo|u may wa|
|00004e50| 6e 74 20 74 6f 20 63 6c | 6f 73 65 20 69 74 2e 20 |nt to cl|ose it. |
|00004e60| 48 6f 77 65 76 65 72 2c | 20 79 6f 75 20 73 68 6f |However,| you sho|
|00004e70| 75 6c 64 20 67 65 6e 65 | 72 61 6c 6c 79 20 6e 6f |uld gene|rally no|
|00004e80| 74 20 63 6c 6f 73 65 20 | 64 72 69 76 65 72 73 20 |t close |drivers |
|00004e90| 74 68 61 74 20 6d 69 67 | 68 74 20 62 65 20 6e 65 |that mig|ht be ne|
|00004ea0| 65 64 65 64 20 62 79 20 | 74 68 65 20 73 79 73 74 |eded by |the syst|
|00004eb0| 65 6d 20 6f 72 20 62 79 | 20 6f 74 68 65 72 20 61 |em or by| other a|
|00004ec0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 2e 20 57 68 65 |pplicati|ons. Whe|
|00004ed0| 74 68 65 72 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ther you| should |
|00004ee0| 63 6c 6f 73 65 20 61 20 | 70 61 72 74 69 63 75 6c |close a |particul|
|00004ef0| 61 72 20 64 72 69 76 65 | 72 20 64 65 70 65 6e 64 |ar drive|r depend|
|00004f00| 73 20 6f 6e 20 74 68 65 | 20 64 72 69 76 65 72 2e |s on the| driver.|
|00004f10| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 63 68 65 63 | You sho|uld chec|
|00004f20| 6b 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 61 74 |k the do|cumentat|
|00004f30| 69 6f 6e 20 66 6f 72 20 | 74 68 65 20 64 72 69 76 |ion for |the driv|
|00004f40| 65 72 20 69 66 20 79 6f | 75 20 61 72 65 20 6e 6f |er if yo|u are no|
|00004f50| 74 20 73 75 72 65 2e 20 | 4f 74 68 65 72 20 63 68 |t sure. |Other ch|
|00004f60| 61 70 74 65 72 73 20 69 | 6e 20 49 6e 73 69 64 65 |apters i|n Inside|
|00004f70| 20 4d 61 63 69 6e 74 6f | 73 68 20 67 69 76 65 20 | Macinto|sh give |
|00004f80| 74 68 69 73 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |this inf|ormation|
|00004f90| 20 66 6f 72 20 74 68 65 | 20 73 74 61 6e 64 61 72 | for the| standar|
|00004fa0| 64 20 4d 61 63 69 6e 74 | 6f 73 68 20 64 72 69 76 |d Macint|osh driv|
|00004fb0| 65 72 73 2e 0d 49 66 20 | 79 6f 75 20 64 6f 20 77 |ers..If |you do w|
|00004fc0| 61 6e 74 20 74 6f 20 63 | 6c 6f 73 65 20 61 20 64 |ant to c|lose a d|
|00004fd0| 72 69 76 65 72 2c 20 79 | 6f 75 20 63 61 6e 20 75 |river, y|ou can u|
|00004fe0| 73 65 20 74 68 65 20 68 | 69 67 68 2d 6c 65 76 65 |se the h|igh-leve|
|00004ff0| 6c 20 43 6c 6f 73 65 44 | 72 69 76 65 72 20 66 75 |l CloseD|river fu|
|00005000| 6e 63 74 69 6f 6e 20 6f | 72 20 74 68 65 20 6c 6f |nction o|r the lo|
|00005010| 77 2d 6c 65 76 65 6c 20 | 50 42 43 6c 6f 73 65 20 |w-level |PBClose |
|00005020| 66 75 6e 63 74 69 6f 6e | 2e 20 4c 69 73 74 69 6e |function|. Listin|
|00005030| 67 20 31 2d 32 20 73 68 | 6f 77 73 20 68 6f 77 20 |g 1-2 sh|ows how |
|00005040| 74 6f 20 75 73 65 20 74 | 68 65 20 50 42 43 4c 6f |to use t|he PBCLo|
|00005050| 73 65 20 66 75 6e 63 74 | 69 6f 6e 20 74 6f 20 63 |se funct|ion to c|
|00005060| 6c 6f 73 65 20 74 68 65 | 20 64 72 69 76 65 72 20 |lose the| driver |
|00005070| 6f 70 65 6e 65 64 20 69 | 6e 20 4c 69 73 74 69 6e |opened i|n Listin|
|00005080| 67 20 31 2d 31 2e 0d 43 | 6c 6f 73 69 6e 67 20 61 |g 1-1..C|losing a|
|00005090| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 0d 50 | device |driver.P|
|000050a0| 52 4f 43 45 44 55 52 45 | 20 4d 79 43 6c 6f 73 65 |ROCEDURE| MyClose|
|000050b0| 44 72 69 76 65 72 3b 0d | 09 09 09 09 56 41 52 0d |Driver;.|....VAR.|
|000050c0| 09 09 09 09 09 70 61 72 | 61 6d 42 6c 6f 63 6b 09 |.....par|amBlock.|
|000050d0| 3a 20 50 61 72 61 6d 42 | 6c 6f 63 6b 52 65 63 3b |: ParamB|lockRec;|
|000050e0| 0d 09 09 09 09 09 65 72 | 72 09 09 09 3a 20 4f 53 |......er|r...: OS|
|000050f0| 45 72 72 3b 0d 0d 09 09 | 09 09 42 45 47 49 4e 0d |Err;....|..BEGIN.|
|00005100| 09 09 09 09 09 70 61 72 | 61 6d 42 6c 6f 63 6b 2e |.....par|amBlock.|
|00005110| 69 6f 43 6f 6d 70 6c 65 | 74 69 6f 6e 09 3a 3d 20 |ioComple|tion.:= |
|00005120| 6e 69 6c 3b 0d 09 09 09 | 09 09 70 61 72 61 6d 42 |nil;....|..paramB|
|00005130| 6c 6f 63 6b 2e 69 6f 52 | 65 66 4e 75 6d 09 09 3a |lock.ioR|efNum..:|
|00005140| 3d 20 67 44 72 76 72 52 | 65 66 4e 75 6d 3b 0d 09 |= gDrvrR|efNum;..|
|00005150| 0d 09 09 09 09 09 65 72 | 72 20 3a 3d 20 50 42 43 |......er|r := PBC|
|00005160| 6c 6f 73 65 20 28 40 70 | 61 72 61 6d 42 6c 6f 63 |lose (@p|aramBloc|
|00005170| 6b 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 09 09 45 |k, FALSE|);.....E|
|00005180| 4e 44 3b 0d 54 68 65 20 | 4d 79 43 6c 6f 73 65 44 |ND;.The |MyCloseD|
|00005190| 72 69 76 65 72 20 70 72 | 6f 63 65 64 75 72 65 20 |river pr|ocedure |
|000051a0| 73 70 65 63 69 66 69 65 | 73 20 74 68 65 20 64 72 |specifie|s the dr|
|000051b0| 69 76 65 72 20 74 6f 20 | 63 6c 6f 73 65 20 62 79 |iver to |close by|
|000051c0| 20 70 72 6f 76 69 64 69 | 6e 67 20 74 68 65 20 64 | providi|ng the d|
|000051d0| 72 69 76 65 72 20 72 65 | 66 65 72 65 6e 63 65 20 |river re|ference |
|000051e0| 6e 75 6d 62 65 72 20 69 | 6e 20 74 68 65 20 69 6f |number i|n the io|
|000051f0| 52 65 66 4e 75 6d 20 66 | 69 65 6c 64 20 6f 66 20 |RefNum f|ield of |
|00005200| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |the para|meter bl|
|00005210| 6f 63 6b 20 61 6e 64 20 | 69 6e 64 69 63 61 74 65 |ock and |indicate|
|00005220| 73 20 74 68 61 74 20 74 | 68 65 20 44 65 76 69 63 |s that t|he Devic|
|00005230| 65 20 4d 61 6e 61 67 65 | 72 20 73 68 6f 75 6c 64 |e Manage|r should|
|00005240| 20 6e 6f 74 20 65 78 65 | 63 75 74 65 20 61 20 63 | not exe|cute a c|
|00005250| 6f 6d 70 6c 65 74 69 6f | 6e 20 72 6f 75 74 69 6e |ompletio|n routin|
|00005260| 65 20 62 79 20 73 70 65 | 63 69 66 79 69 6e 67 20 |e by spe|cifying |
|00005270| 4e 49 4c 20 69 6e 20 74 | 68 65 20 69 6f 43 6f 6d |NIL in t|he ioCom|
|00005280| 70 6c 65 74 69 6f 6e 20 | 66 69 65 6c 64 20 6f 66 |pletion |field of|
|00005290| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 20 62 | the par|ameter b|
|000052a0| 6c 6f 63 6b 2e 20 0d 43 | 6f 6d 6d 75 6e 69 63 61 |lock. .C|ommunica|
|000052b0| 74 69 6e 67 20 57 69 74 | 68 20 44 65 76 69 63 65 |ting Wit|h Device|
|000052c0| 20 44 72 69 76 65 72 73 | 0d 4f 6e 63 65 20 61 20 | Drivers|.Once a |
|000052d0| 64 72 69 76 65 72 20 69 | 73 20 6f 70 65 6e 20 61 |driver i|s open a|
|000052e0| 6e 64 20 79 6f 75 20 68 | 61 76 65 20 69 74 73 20 |nd you h|ave its |
|000052f0| 72 65 66 65 72 65 6e 63 | 65 20 6e 75 6d 62 65 72 |referenc|e number|
|00005300| 2c 20 79 6f 75 20 63 61 | 6e 20 75 73 65 20 44 65 |, you ca|n use De|
|00005310| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 63 6f 6d |vice Man|ager com|
|00005320| 6d 75 6e 69 63 61 74 69 | 6f 6e 20 72 6f 75 74 69 |municati|on routi|
|00005330| 6e 65 73 20 74 6f 20 65 | 78 63 68 61 6e 67 65 20 |nes to e|xchange |
|00005340| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 77 69 74 68 |informat|ion with|
|00005350| 20 69 74 2e 0d 57 68 65 | 6e 20 79 6f 75 20 77 61 | it..Whe|n you wa|
|00005360| 6e 74 20 74 6f 20 73 65 | 6e 64 20 69 6e 66 6f 72 |nt to se|nd infor|
|00005370| 6d 61 74 69 6f 6e 20 74 | 6f 20 61 20 64 65 76 69 |mation t|o a devi|
|00005380| 63 65 20 64 72 69 76 65 | 72 2c 20 79 6f 75 20 66 |ce drive|r, you f|
|00005390| 69 72 73 74 20 73 74 6f | 72 65 20 74 68 65 20 69 |irst sto|re the i|
|000053a0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 6e 20 61 20 |nformati|on in a |
|000053b0| 64 61 74 61 20 62 75 66 | 66 65 72 20 61 6e 64 20 |data buf|fer and |
|000053c0| 74 68 65 6e 20 63 61 6c | 6c 20 74 68 65 20 46 53 |then cal|l the FS|
|000053d0| 57 72 69 74 65 20 66 75 | 6e 63 74 69 6f 6e 20 6f |Write fu|nction o|
|000053e0| 72 20 74 68 65 20 50 42 | 57 72 69 74 65 20 66 75 |r the PB|Write fu|
|000053f0| 6e 63 74 69 6f 6e 2e 20 | 57 68 65 6e 20 79 6f 75 |nction. |When you|
|00005400| 20 77 61 6e 74 20 74 6f | 20 72 65 63 65 69 76 65 | want to| receive|
|00005410| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 66 72 6f | informa|tion fro|
|00005420| 6d 20 61 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |m a devi|ce drive|
|00005430| 72 2c 20 79 6f 75 20 66 | 69 72 73 74 20 61 6c 6c |r, you f|irst all|
|00005440| 6f 63 61 74 65 20 61 20 | 64 61 74 61 20 62 75 66 |ocate a |data buf|
|00005450| 66 65 72 20 74 6f 20 68 | 6f 6c 64 20 74 68 65 20 |fer to h|old the |
|00005460| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2c 20 61 6e 64 |informat|ion, and|
|00005470| 20 74 68 65 6e 20 63 61 | 6c 6c 20 74 68 65 20 46 | then ca|ll the F|
|00005480| 53 52 65 61 64 20 6f 72 | 20 50 42 52 65 61 64 20 |SRead or| PBRead |
|00005490| 66 75 6e 63 74 69 6f 6e | 2e 20 59 6f 75 20 6d 75 |function|. You mu|
|000054a0| 73 74 20 73 70 65 63 69 | 66 79 20 74 68 65 20 6e |st speci|fy the n|
|000054b0| 75 6d 62 65 72 20 6f 66 | 20 62 79 74 65 73 20 79 |umber of| bytes y|
|000054c0| 6f 75 20 77 61 6e 74 20 | 74 72 61 6e 73 66 65 72 |ou want |transfer|
|000054d0| 72 65 64 20 77 68 65 6e | 20 63 61 6c 6c 69 6e 67 |red when| calling|
|000054e0| 20 61 6e 79 20 6f 66 20 | 74 68 65 73 65 20 66 75 | any of |these fu|
|000054f0| 6e 63 74 69 6f 6e 73 2e | 0d 4c 69 6b 65 20 61 6c |nctions.|.Like al|
|00005500| 6c 20 6c 6f 77 2d 6c 65 | 76 65 6c 20 72 6f 75 74 |l low-le|vel rout|
|00005510| 69 6e 65 73 2c 20 74 68 | 65 20 50 42 57 72 69 74 |ines, th|e PBWrit|
|00005520| 65 20 61 6e 64 20 50 42 | 52 65 61 64 20 66 75 6e |e and PB|Read fun|
|00005530| 63 74 69 6f 6e 73 20 61 | 6c 6c 6f 77 20 79 6f 75 |ctions a|llow you|
|00005540| 20 74 6f 20 74 72 61 6e | 73 66 65 72 20 74 68 65 | to tran|sfer the|
|00005550| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 61 73 79 | informa|tion asy|
|00005560| 6e 63 68 72 6f 6e 6f 75 | 73 6c 79 2c 20 61 6e 64 |nchronou|sly, and|
|00005570| 20 77 69 74 68 20 74 68 | 65 73 65 20 66 75 6e 63 | with th|ese func|
|00005580| 74 69 6f 6e 73 20 79 6f | 75 20 63 61 6e 20 70 72 |tions yo|u can pr|
|00005590| 6f 76 69 64 65 20 61 20 | 63 6f 6d 70 6c 65 74 69 |ovide a |completi|
|000055a0| 6f 6e 20 72 6f 75 74 69 | 6e 65 2e 20 54 68 65 73 |on routi|ne. Thes|
|000055b0| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 6c 73 6f |e functi|ons also|
|000055c0| 20 61 6c 6c 6f 77 20 79 | 6f 75 20 74 6f 20 73 70 | allow y|ou to sp|
|000055d0| 65 63 69 66 79 20 61 20 | 64 72 69 76 65 20 6e 75 |ecify a |drive nu|
|000055e0| 6d 62 65 72 2c 20 61 20 | 70 6f 73 69 74 69 6f 6e |mber, a |position|
|000055f0| 69 6e 67 20 6d 6f 64 65 | 2c 20 61 6e 64 20 61 20 |ing mode|, and a |
|00005600| 70 6f 73 69 74 69 6f 6e | 69 6e 67 20 6f 66 66 73 |position|ing offs|
|00005610| 65 74 20 69 6e 20 74 68 | 65 20 69 6f 56 52 65 66 |et in th|e ioVRef|
|00005620| 4e 75 6d 2c 20 69 6f 50 | 6f 73 4d 6f 64 65 2c 20 |Num, ioP|osMode, |
|00005630| 61 6e 64 20 69 6f 50 6f | 73 4f 66 66 73 65 74 20 |and ioPo|sOffset |
|00005640| 66 69 65 6c 64 73 20 6f | 66 20 74 68 65 20 70 61 |fields o|f the pa|
|00005650| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 2e 20 54 |rameter |block. T|
|00005660| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|00005670| 72 20 75 73 65 73 20 74 | 68 65 20 70 6f 73 69 74 |r uses t|he posit|
|00005680| 69 6f 6e 69 6e 67 20 6d | 6f 64 65 20 61 6e 64 20 |ioning m|ode and |
|00005690| 70 6f 73 69 74 69 6f 6e | 69 6e 67 20 6f 66 66 73 |position|ing offs|
|000056a0| 65 74 20 74 6f 20 64 65 | 74 65 72 6d 69 6e 65 20 |et to de|termine |
|000056b0| 77 68 65 72 65 20 6f 6e | 20 61 20 62 6c 6f 63 6b |where on| a block|
|000056c0| 20 64 65 76 69 63 65 20 | 74 68 65 20 74 72 61 6e | device |the tran|
|000056d0| 73 66 65 72 20 77 69 6c | 6c 20 6f 63 63 75 72 2e |sfer wil|l occur.|
|000056e0| 20 54 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | The Dev|ice Mana|
|000056f0| 67 65 72 20 73 69 6d 70 | 6c 79 20 70 61 73 73 65 |ger simp|ly passe|
|00005700| 73 20 74 68 65 20 64 72 | 69 76 65 20 6e 75 6d 62 |s the dr|ive numb|
|00005710| 65 72 20 6f 6e 74 6f 20 | 74 68 65 20 64 72 69 76 |er onto |the driv|
|00005720| 65 72 2e 20 42 65 20 73 | 75 72 65 20 79 6f 75 20 |er. Be s|ure you |
|00005730| 73 70 65 63 69 66 79 20 | 74 68 65 73 65 20 76 61 |specify |these va|
|00005740| 6c 75 65 73 20 69 6e 20 | 61 20 6d 61 6e 6e 65 72 |lues in |a manner|
|00005750| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00005760| 20 74 68 65 20 70 61 72 | 74 69 63 75 6c 61 72 20 | the par|ticular |
|00005770| 64 72 69 76 65 72 2e 0d | 54 68 65 20 44 65 76 69 |driver..|The Devi|
|00005780| 63 65 20 4d 61 6e 61 67 | 65 72 20 64 65 66 69 6e |ce Manag|er defin|
|00005790| 65 73 20 74 68 72 65 65 | 20 70 6f 73 69 74 69 6f |es three| positio|
|000057a0| 6e 69 6e 67 20 6d 6f 64 | 65 73 20 66 6f 72 20 62 |ning mod|es for b|
|000057b0| 6c 6f 63 6b 20 64 65 76 | 69 63 65 73 3a 0d 6e 09 |lock dev|ices:.n.|
|000057c0| 41 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |At the c|urrent p|
|000057d0| 6f 73 69 74 69 6f 6e 2e | 20 57 69 74 68 20 74 68 |osition.| With th|
|000057e0| 69 73 20 6d 6f 64 65 2c | 20 74 68 65 20 74 72 61 |is mode,| the tra|
|000057f0| 6e 73 66 65 72 20 62 65 | 67 69 6e 73 20 61 74 20 |nsfer be|gins at |
|00005800| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 6f 73 69 |the curr|ent posi|
|00005810| 74 69 6f 6e 20 6f 6e 20 | 74 68 65 20 6d 65 64 69 |tion on |the medi|
|00005820| 75 6d d1 74 79 70 69 63 | 61 6c 6c 79 20 77 68 65 |um.typic|ally whe|
|00005830| 72 65 20 74 68 65 20 6c | 61 73 74 20 74 72 61 6e |re the l|ast tran|
|00005840| 73 66 65 72 20 65 6e 64 | 65 64 2e 0d 6e 09 4f 66 |sfer end|ed..n.Of|
|00005850| 66 73 65 74 20 66 72 6f | 6d 20 74 68 65 20 73 74 |fset fro|m the st|
|00005860| 61 72 74 2e 20 54 68 69 | 73 20 6d 6f 64 65 20 61 |art. Thi|s mode a|
|00005870| 6c 6c 6f 77 73 20 79 6f | 75 20 74 6f 20 70 72 6f |llows yo|u to pro|
|00005880| 76 69 64 65 20 61 20 70 | 6f 73 69 74 69 6f 6e 69 |vide a p|ositioni|
|00005890| 6e 67 20 6f 66 66 73 65 | 74 2c 20 77 68 69 63 68 |ng offse|t, which|
|000058a0| 20 73 70 65 63 69 66 69 | 65 73 20 61 74 20 68 6f | specifi|es at ho|
|000058b0| 77 20 6d 61 6e 79 20 62 | 79 74 65 73 20 66 72 6f |w many b|ytes fro|
|000058c0| 6d 20 74 68 65 20 62 65 | 67 69 6e 6e 69 6e 67 20 |m the be|ginning |
|000058d0| 6f 66 20 74 68 65 20 6d | 65 64 69 75 6d 20 74 68 |of the m|edium th|
|000058e0| 65 20 74 72 61 6e 73 66 | 65 72 20 77 69 6c 6c 20 |e transf|er will |
|000058f0| 62 65 67 69 6e 2e 0d 6e | 09 4f 66 66 73 65 74 20 |begin..n|.Offset |
|00005900| 66 72 6f 6d 20 74 68 65 | 20 6d 61 72 6b 2e 20 57 |from the| mark. W|
|00005910| 69 74 68 20 74 68 69 73 | 20 6d 6f 64 65 20 79 6f |ith this| mode yo|
|00005920| 75 20 63 61 6e 20 70 72 | 6f 76 69 64 65 20 61 20 |u can pr|ovide a |
|00005930| 70 6f 73 69 74 69 6f 6e | 69 6e 67 20 6f 66 66 73 |position|ing offs|
|00005940| 65 74 20 74 68 61 74 20 | 73 70 65 63 69 66 69 65 |et that |specifie|
|00005950| 73 20 61 74 20 68 6f 77 | 20 6d 61 6e 79 20 62 79 |s at how| many by|
|00005960| 74 65 73 20 66 72 6f 6d | 20 74 68 65 20 63 75 72 |tes from| the cur|
|00005970| 72 65 6e 74 20 70 6f 73 | 69 74 69 6f 6e 20 74 68 |rent pos|ition th|
|00005980| 65 20 74 72 61 6e 73 66 | 65 72 20 77 69 6c 6c 20 |e transf|er will |
|00005990| 62 65 67 69 6e 2e 20 0d | 4f 6e 20 63 6f 6d 70 6c |begin. .|On compl|
|000059a0| 65 74 69 6f 6e 2c 20 74 | 68 65 20 50 42 52 65 61 |etion, t|he PBRea|
|000059b0| 64 20 61 6e 64 20 50 42 | 57 72 69 74 65 20 66 75 |d and PB|Write fu|
|000059c0| 6e 63 74 69 6f 6e 73 20 | 72 65 74 75 72 6e 20 74 |nctions |return t|
|000059d0| 68 65 20 74 6f 74 61 6c | 20 6e 75 6d 62 65 72 20 |he total| number |
|000059e0| 6f 66 20 62 79 74 65 73 | 20 61 63 74 75 61 6c 6c |of bytes| actuall|
|000059f0| 79 20 74 72 61 6e 73 66 | 65 72 72 65 64 20 69 6e |y transf|erred in|
|00005a00| 20 74 68 65 20 69 6f 41 | 63 74 43 6f 75 6e 74 20 | the ioA|ctCount |
|00005a10| 66 69 65 6c 64 20 6f 66 | 20 74 68 65 20 70 61 72 |field of| the par|
|00005a20| 61 6d 65 74 65 72 20 62 | 6c 6f 63 6b 2e 20 46 6f |ameter b|lock. Fo|
|00005a30| 72 20 62 6c 6f 63 6b 20 | 64 65 76 69 63 65 73 2c |r block |devices,|
|00005a40| 20 74 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 73 | these f|unctions|
|00005a50| 20 61 6c 73 6f 20 72 65 | 74 75 72 6e 20 61 20 6e | also re|turn a n|
|00005a60| 65 77 20 70 6f 73 69 74 | 69 6f 6e 69 6e 67 20 6f |ew posit|ioning o|
|00005a70| 66 66 73 65 74 20 69 6e | 20 74 68 65 20 69 6f 50 |ffset in| the ioP|
|00005a80| 6f 73 4f 66 66 73 65 74 | 20 66 69 65 6c 64 2e 0d |osOffset| field..|
|00005a90| 43 65 72 74 61 69 6e 20 | 64 65 76 69 63 65 20 64 |Certain |device d|
|00005aa0| 72 69 76 65 72 73 20 70 | 72 6f 76 69 64 65 20 61 |rivers p|rovide a|
|00005ab0| 64 64 69 74 69 6f 6e 61 | 6c 20 61 62 69 6c 69 74 |dditiona|l abilit|
|00005ac0| 69 65 73 20 77 69 74 68 | 20 74 68 65 20 72 65 61 |ies with| the rea|
|00005ad0| 64 69 6e 67 20 61 6e 64 | 20 77 72 69 74 69 6e 67 |ding and| writing|
|00005ae0| 20 66 75 6e 63 74 69 6f | 6e 73 2e 20 46 6f 72 20 | functio|ns. For |
|00005af0| 65 78 61 6d 70 6c 65 2c | 20 74 68 65 20 44 69 73 |example,| the Dis|
|00005b00| 6b 20 44 72 69 76 65 72 | 20 61 6c 6c 6f 77 73 20 |k Driver| allows |
|00005b10| 79 6f 75 20 74 6f 20 75 | 73 65 20 74 68 65 20 50 |you to u|se the P|
|00005b20| 42 52 65 61 64 20 66 75 | 6e 63 74 69 6f 6e 20 74 |BRead fu|nction t|
|00005b30| 6f 20 76 65 72 69 66 79 | 20 74 68 61 74 20 64 61 |o verify| that da|
|00005b40| 74 61 20 77 72 69 74 74 | 65 6e 20 74 6f 20 61 20 |ta writt|en to a |
|00005b50| 62 6c 6f 63 6b 20 64 65 | 76 69 63 65 20 6d 61 74 |block de|vice mat|
|00005b60| 63 68 65 73 20 74 68 65 | 20 64 61 74 61 20 69 6e |ches the| data in|
|00005b70| 20 6d 65 6d 6f 72 79 2e | 20 54 6f 20 64 6f 20 74 | memory.| To do t|
|00005b80| 68 69 73 2c 20 79 6f 75 | 20 61 64 64 20 74 68 65 |his, you| add the|
|00005b90| 20 72 65 61 64 2d 76 65 | 72 69 66 79 20 63 6f 6e | read-ve|rify con|
|00005ba0| 73 74 61 6e 74 0d 43 4f | 4e 53 54 20 72 64 56 65 |stant.CO|NST rdVe|
|00005bb0| 72 69 66 79 20 3d 20 36 | 34 3b 0d 74 6f 20 74 68 |rify = 6|4;.to th|
|00005bc0| 65 20 69 6f 50 6f 73 4d | 6f 64 65 20 66 69 65 6c |e ioPosM|ode fiel|
|00005bd0| 64 20 6f 66 20 74 68 65 | 20 70 61 72 61 6d 65 74 |d of the| paramet|
|00005be0| 65 72 20 62 6c 6f 63 6b | 2c 20 61 73 20 65 78 70 |er block|, as exp|
|00005bf0| 6c 61 69 6e 65 64 20 69 | 6e 20 74 68 65 20 64 65 |lained i|n the de|
|00005c00| 73 63 72 69 70 74 69 6f | 6e 20 6f 66 20 74 68 65 |scriptio|n of the|
|00005c10| 20 50 42 52 65 61 64 20 | 66 75 6e 63 74 69 6f 6e | PBRead |function|
|00005c20| 20 69 6e 20 d2 52 6f 75 | 74 69 6e 65 73 2c d3 20 | in .Rou|tines,. |
|00005c30| 6f 6e 20 70 61 67 65 20 | 31 2d 32 35 2e 0d 4c 69 |on page |1-25..Li|
|00005c40| 73 74 69 6e 67 20 31 2d | 33 20 73 68 6f 77 73 20 |sting 1-|3 shows |
|00005c50| 61 6e 20 65 78 61 6d 70 | 6c 65 20 74 68 61 74 20 |an examp|le that |
|00005c60| 65 78 63 68 61 6e 67 65 | 73 20 69 6e 66 6f 72 6d |exchange|s inform|
|00005c70| 61 74 69 6f 6e 20 77 69 | 74 68 20 61 20 64 65 76 |ation wi|th a dev|
|00005c80| 69 63 65 20 64 72 69 76 | 65 72 2e 20 0d 43 6f 6d |ice driv|er. .Com|
|00005c90| 6d 75 6e 69 63 61 74 69 | 6e 67 20 77 69 74 68 20 |municati|ng with |
|00005ca0| 61 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 0d |a device| driver.|
|00005cb0| 09 09 09 50 52 4f 43 45 | 44 55 52 45 20 4d 79 52 |...PROCE|DURE MyR|
|00005cc0| 65 61 64 46 72 6f 6d 44 | 72 69 76 65 72 3b 0d 09 |eadFromD|river;..|
|00005cd0| 09 09 09 56 41 52 0d 09 | 09 09 09 09 70 61 72 61 |...VAR..|....para|
|00005ce0| 6d 42 6c 6f 63 6b 09 3a | 20 50 61 72 61 6d 42 6c |mBlock.:| ParamBl|
|00005cf0| 6f 63 6b 52 65 63 3b 0d | 09 09 09 09 09 65 72 72 |ockRec;.|.....err|
|00005d00| 09 09 09 3a 20 4f 53 45 | 72 72 3b 0d 09 09 09 09 |...: OSE|rr;.....|
|00005d10| 09 72 65 61 64 42 75 66 | 09 09 3a 20 53 74 72 32 |.readBuf|..: Str2|
|00005d20| 35 35 3b 0d 0d 09 09 09 | 09 42 45 47 49 4e 0d 09 |55;.....|.BEGIN..|
|00005d30| 09 09 09 09 70 61 72 61 | 6d 42 6c 6f 63 6b 2e 69 |....para|mBlock.i|
|00005d40| 6f 43 6f 6d 70 6c 65 74 | 69 6f 6e 09 3a 3d 20 6e |oComplet|ion.:= n|
|00005d50| 69 6c 3b 0d 09 09 09 09 | 09 70 61 72 61 6d 42 6c |il;.....|.paramBl|
|00005d60| 6f 63 6b 2e 69 6f 52 65 | 66 4e 75 6d 09 09 3a 3d |ock.ioRe|fNum..:=|
|00005d70| 20 67 44 72 76 72 52 65 | 66 4e 75 6d 3b 0d 09 09 | gDrvrRe|fNum;...|
|00005d80| 09 09 09 70 61 72 61 6d | 42 6c 6f 63 6b 2e 69 6f |...param|Block.io|
|00005d90| 42 75 66 66 65 72 09 09 | 3a 3d 20 40 72 65 61 64 |Buffer..|:= @read|
|00005da0| 42 75 66 3b 0d 09 09 09 | 09 09 70 61 72 61 6d 42 |Buf;....|..paramB|
|00005db0| 6c 6f 63 6b 2e 69 6f 52 | 65 71 43 6f 75 6e 74 09 |lock.ioR|eqCount.|
|00005dc0| 3a 3d 20 32 35 36 3b 0d | 09 0d 09 09 09 09 09 65 |:= 256;.|.......e|
|00005dd0| 72 72 20 3a 3d 20 50 42 | 52 65 61 64 20 28 40 70 |rr := PB|Read (@p|
|00005de0| 61 72 61 6d 42 6c 6f 63 | 6b 2c 20 46 41 4c 53 45 |aramBloc|k, FALSE|
|00005df0| 29 3b 0d 09 09 09 09 45 | 4e 44 3b 0d 0d 50 52 4f |);.....E|ND;..PRO|
|00005e00| 43 45 44 55 52 45 20 4d | 79 57 72 69 74 65 54 6f |CEDURE M|yWriteTo|
|00005e10| 44 72 69 76 65 72 3b 0d | 09 09 09 09 56 41 52 0d |Driver;.|....VAR.|
|00005e20| 09 09 09 09 09 70 61 72 | 61 6d 42 6c 6f 63 6b 09 |.....par|amBlock.|
|00005e30| 3a 20 50 61 72 61 6d 42 | 6c 6f 63 6b 52 65 63 3b |: ParamB|lockRec;|
|00005e40| 0d 09 09 09 09 09 65 72 | 72 09 09 09 3a 20 4f 53 |......er|r...: OS|
|00005e50| 45 72 72 3b 0d 09 09 09 | 09 09 62 75 66 66 65 72 |Err;....|..buffer|
|00005e60| 09 09 3a 20 53 74 72 32 | 35 35 3b 0d 0d 09 09 09 |..: Str2|55;.....|
|00005e70| 09 42 45 47 49 4e 0d 09 | 09 09 09 09 62 75 66 66 |.BEGIN..|....buff|
|00005e80| 65 72 20 3a 3d 20 27 44 | 61 74 61 20 74 6f 20 57 |er := 'D|ata to W|
|00005e90| 72 69 74 65 27 3b 0d 0d | 09 09 09 09 09 70 61 72 |rite';..|.....par|
|00005ea0| 61 6d 42 6c 6f 63 6b 2e | 69 6f 43 6f 6d 70 6c 65 |amBlock.|ioComple|
|00005eb0| 74 69 6f 6e 09 3a 3d 20 | 6e 69 6c 3b 0d 09 09 09 |tion.:= |nil;....|
|00005ec0| 09 09 70 61 72 61 6d 42 | 6c 6f 63 6b 2e 69 6f 52 |..paramB|lock.ioR|
|00005ed0| 65 66 4e 75 6d 09 09 3a | 3d 20 67 44 72 76 72 52 |efNum..:|= gDrvrR|
|00005ee0| 65 66 4e 75 6d 3b 0d 09 | 09 09 09 09 70 61 72 61 |efNum;..|....para|
|00005ef0| 6d 42 6c 6f 63 6b 2e 69 | 6f 42 75 66 66 65 72 09 |mBlock.i|oBuffer.|
|00005f00| 09 3a 3d 20 40 62 75 66 | 66 65 72 3b 0d 09 09 09 |.:= @buf|fer;....|
|00005f10| 09 09 70 61 72 61 6d 42 | 6c 6f 63 6b 2e 69 6f 52 |..paramB|lock.ioR|
|00005f20| 65 71 43 6f 75 6e 74 09 | 3a 3d 20 31 34 3b 0d 09 |eqCount.|:= 14;..|
|00005f30| 0d 09 09 09 09 09 65 72 | 72 20 3a 3d 20 50 42 57 |......er|r := PBW|
|00005f40| 72 69 74 65 20 28 40 70 | 61 72 61 6d 42 6c 6f 63 |rite (@p|aramBloc|
|00005f50| 6b 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 09 09 45 |k, FALSE|);.....E|
|00005f60| 4e 44 3b 0d 54 68 65 20 | 4d 79 52 65 61 64 46 72 |ND;.The |MyReadFr|
|00005f70| 6f 6d 44 72 69 76 65 72 | 20 70 72 6f 63 65 64 75 |omDriver| procedu|
|00005f80| 72 65 20 75 73 65 73 20 | 61 20 70 61 72 61 6d 65 |re uses |a parame|
|00005f90| 74 65 72 20 62 6c 6f 63 | 6b 20 74 6f 20 73 70 65 |ter bloc|k to spe|
|00005fa0| 63 69 66 79 20 74 68 65 | 20 64 65 76 69 63 65 20 |cify the| device |
|00005fb0| 64 72 69 76 65 72 20 28 | 62 79 20 72 65 66 65 72 |driver (|by refer|
|00005fc0| 65 6e 63 65 20 6e 75 6d | 62 65 72 29 2c 20 74 68 |ence num|ber), th|
|00005fd0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 62 79 74 65 |e number| of byte|
|00005fe0| 73 20 74 6f 20 72 65 61 | 64 2c 20 61 20 70 6f 69 |s to rea|d, a poi|
|00005ff0| 6e 74 65 72 20 74 6f 20 | 61 20 62 75 66 66 65 72 |nter to |a buffer|
|00006000| 20 74 6f 20 72 65 63 65 | 69 76 65 20 74 68 65 20 | to rece|ive the |
|00006010| 64 61 74 61 2c 20 61 6e | 64 20 4e 49 4c 20 66 6f |data, an|d NIL fo|
|00006020| 72 20 74 68 65 20 63 6f | 6d 70 6c 65 74 69 6f 6e |r the co|mpletion|
|00006030| 20 72 6f 75 74 69 6e 65 | 2e 20 49 74 20 74 68 65 | routine|. It the|
|00006040| 6e 20 73 65 6e 64 73 20 | 74 68 65 20 70 61 72 61 |n sends |the para|
|00006050| 6d 65 74 65 72 20 62 6c | 6f 63 6b 20 74 6f 20 74 |meter bl|ock to t|
|00006060| 68 65 20 50 42 52 65 61 | 64 20 66 75 6e 63 74 69 |he PBRea|d functi|
|00006070| 6f 6e 2e 20 54 68 65 20 | 44 65 76 69 63 65 20 4d |on. The |Device M|
|00006080| 61 6e 61 67 65 72 20 61 | 70 70 65 6e 64 73 20 74 |anager a|ppends t|
|00006090| 68 65 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |he param|eter blo|
|000060a0| 63 6b 20 74 6f 20 74 68 | 65 20 65 6e 64 20 6f 66 |ck to th|e end of|
|000060b0| 20 74 68 65 20 64 72 69 | 76 65 72 d5 73 20 72 65 | the dri|ver.s re|
|000060c0| 71 75 65 73 74 20 71 75 | 65 75 65 2e 20 53 69 6e |quest qu|eue. Sin|
|000060d0| 63 65 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |ce the p|arameter|
|000060e0| 20 61 73 79 6e 63 20 69 | 73 20 73 65 74 20 74 6f | async i|s set to|
|000060f0| 20 46 41 4c 53 45 2c 20 | 74 68 65 20 44 65 76 69 | FALSE, |the Devi|
|00006100| 63 65 20 4d 61 6e 61 67 | 65 72 20 64 6f 65 73 20 |ce Manag|er does |
|00006110| 6e 6f 74 20 72 65 74 75 | 72 6e 20 63 6f 6e 74 72 |not retu|rn contr|
|00006120| 6f 6c 20 74 6f 20 74 68 | 65 20 4d 79 52 65 61 64 |ol to th|e MyRead|
|00006130| 46 72 6f 6d 44 72 69 76 | 65 72 20 70 72 6f 63 65 |FromDriv|er proce|
|00006140| 64 75 72 65 20 75 6e 74 | 69 6c 20 74 68 65 20 64 |dure unt|il the d|
|00006150| 72 69 76 65 72 20 68 61 | 73 20 63 6f 6d 70 6c 65 |river ha|s comple|
|00006160| 74 65 64 20 65 76 65 72 | 79 20 72 65 71 75 65 73 |ted ever|y reques|
|00006170| 74 20 69 6e 20 69 74 73 | 20 71 75 65 75 65 2e 0d |t in its| queue..|
|00006180| 54 68 65 20 4d 79 57 72 | 69 74 65 54 6f 44 72 69 |The MyWr|iteToDri|
|00006190| 76 65 72 20 70 72 6f 63 | 65 64 75 72 65 20 75 73 |ver proc|edure us|
|000061a0| 65 73 20 61 20 70 61 72 | 61 6d 65 74 65 72 20 62 |es a par|ameter b|
|000061b0| 6c 6f 63 6b 20 74 6f 20 | 73 70 65 63 69 66 79 20 |lock to |specify |
|000061c0| 74 68 65 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |the devi|ce drive|
|000061d0| 72 20 28 62 79 20 72 65 | 66 65 72 65 6e 63 65 20 |r (by re|ference |
|000061e0| 6e 75 6d 62 65 72 29 2c | 20 74 68 65 20 73 69 7a |number),| the siz|
|000061f0| 65 20 6f 66 20 74 68 65 | 20 64 61 74 61 20 74 6f |e of the| data to|
|00006200| 20 77 72 69 74 65 2c 20 | 61 20 70 6f 69 6e 74 65 | write, |a pointe|
|00006210| 72 20 74 6f 20 74 68 65 | 20 61 63 74 75 61 6c 20 |r to the| actual |
|00006220| 64 61 74 61 2c 20 61 6e | 64 20 4e 49 4c 20 66 6f |data, an|d NIL fo|
|00006230| 72 20 74 68 65 20 63 6f | 6d 70 6c 65 74 69 6f 6e |r the co|mpletion|
|00006240| 20 72 6f 75 74 69 6e 65 | 2e 20 49 74 20 74 68 65 | routine|. It the|
|00006250| 6e 20 73 65 6e 64 73 20 | 74 68 65 20 70 61 72 61 |n sends |the para|
|00006260| 6d 65 74 65 72 20 62 6c | 6f 63 6b 20 74 6f 20 74 |meter bl|ock to t|
|00006270| 68 65 20 50 42 57 72 69 | 74 65 20 66 75 6e 63 74 |he PBWri|te funct|
|00006280| 69 6f 6e 2e 20 54 68 65 | 20 44 65 76 69 63 65 20 |ion. The| Device |
|00006290| 4d 61 6e 61 67 65 72 20 | 61 70 70 65 6e 64 73 20 |Manager |appends |
|000062a0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |the para|meter bl|
|000062b0| 6f 63 6b 20 74 6f 20 74 | 68 65 20 65 6e 64 20 6f |ock to t|he end o|
|000062c0| 66 20 74 68 65 20 64 72 | 69 76 65 72 d5 73 20 72 |f the dr|iver.s r|
|000062d0| 65 71 75 65 73 74 20 71 | 75 65 75 65 2e 20 53 69 |equest q|ueue. Si|
|000062e0| 6e 63 65 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 |nce the |paramete|
|000062f0| 72 20 61 73 79 6e 63 20 | 69 73 20 73 65 74 20 74 |r async |is set t|
|00006300| 6f 20 46 41 4c 53 45 2c | 20 74 68 65 20 44 65 76 |o FALSE,| the Dev|
|00006310| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 64 6f 65 73 |ice Mana|ger does|
|00006320| 20 6e 6f 74 20 72 65 74 | 75 72 6e 20 63 6f 6e 74 | not ret|urn cont|
|00006330| 72 6f 6c 20 74 6f 20 74 | 68 65 20 4d 79 57 72 69 |rol to t|he MyWri|
|00006340| 74 65 54 6f 44 72 69 76 | 65 72 20 70 72 6f 63 65 |teToDriv|er proce|
|00006350| 64 75 72 65 20 75 6e 74 | 69 6c 20 74 68 65 20 64 |dure unt|il the d|
|00006360| 72 69 76 65 72 20 68 61 | 73 20 63 6f 6d 70 6c 65 |river ha|s comple|
|00006370| 74 65 64 20 65 76 65 72 | 79 20 72 65 71 75 65 73 |ted ever|y reques|
|00006380| 74 20 69 6e 20 69 74 73 | 20 71 75 65 75 65 2e 0d |t in its| queue..|
|00006390| 43 6f 6e 74 72 6f 6c 6c | 69 6e 67 20 61 6e 64 20 |Controll|ing and |
|000063a0| 4d 6f 6e 69 74 6f 72 69 | 6e 67 20 44 65 76 69 63 |Monitori|ng Devic|
|000063b0| 65 20 44 72 69 76 65 72 | 73 0d 49 6e 20 61 64 64 |e Driver|s.In add|
|000063c0| 69 74 69 6f 6e 20 74 6f | 20 74 68 65 20 72 65 61 |ition to| the rea|
|000063d0| 64 69 6e 67 20 61 6e 64 | 20 77 72 69 74 69 6e 67 |ding and| writing|
|000063e0| 20 72 6f 75 74 69 6e 65 | 73 2c 20 74 68 65 20 44 | routine|s, the D|
|000063f0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 70 72 |evice Ma|nager pr|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.